Skip to content

Commit c0b7208

Browse files
committedApr 3, 2012
Avoid multiple redraws if loading projects
1 parent d2fbcfe commit c0b7208

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/app/legend/qgslegend.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2037,6 +2037,7 @@ void QgsLegend::handleItemChange( QTreeWidgetItem* item, int column )
20372037

20382038
bool changing = mChanging;
20392039
mChanging = true;
2040+
bool mapCanvasFrozen = mMapCanvas->isFrozen(); //save freeze state
20402041

20412042
if ( !changing )
20422043
{
@@ -2091,7 +2092,7 @@ void QgsLegend::handleItemChange( QTreeWidgetItem* item, int column )
20912092
{
20922093
// If it was on, turn it back on, otherwise leave it
20932094
// off, as turning it on causes a refresh.
2094-
mMapCanvas->freeze( false );
2095+
mMapCanvas->freeze( mapCanvasFrozen );
20952096

20962097
// update layer set
20972098
updateMapCanvasLayerSet();

0 commit comments

Comments
 (0)
Please sign in to comment.