File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,16 @@ void QgsLegendLayer::updateIcon()
340340 // TODO: projection error icon?
341341
342342 QIcon theIcon ( newIcon );
343+ QgsLegend* l = legend ();
344+ if ( l )
345+ {
346+ l->blockSignals ( true ); // prevent unnecessary canvas redraw
347+ }
343348 setIcon ( 0 , theIcon );
349+ if ( l )
350+ {
351+ l->blockSignals ( false );
352+ }
344353}
345354
346355QPixmap QgsLegendLayer::getOriginalPixmap ()
Original file line number Diff line number Diff line change @@ -3653,9 +3653,6 @@ bool QgsVectorLayer::commitChanges()
36533653
36543654 updateFieldMap ();
36553655 mDataProvider ->updateExtents ();
3656-
3657- triggerRepaint ();
3658-
36593656 QgsDebugMsg ( " result:\n " + mCommitErrors .join ( " \n " ) );
36603657
36613658 return success;
@@ -3717,8 +3714,6 @@ bool QgsVectorLayer::rollBack()
37173714 // invalidate the cache so the layer updates properly to show its original
37183715 // after the rollback
37193716 setCacheImage ( 0 );
3720- triggerRepaint ();
3721-
37223717 return true ;
37233718}
37243719
You can’t perform that action at this time.
0 commit comments