Skip to content

Commit 237dc0a

Browse files
author
mhugent
committed
Fix for other multiple redraws
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15174 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 69c4c88 commit 237dc0a

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/app/legend/qgslegendlayer.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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

346355
QPixmap QgsLegendLayer::getOriginalPixmap()

src/core/qgsvectorlayer.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)