Skip to content
Permalink
Browse files
Avoid multiple redraws if loading projects
  • Loading branch information
mhugent committed Apr 3, 2012
1 parent d2fbcfe commit c0b720805b5f21b4fc8cb108682b8e8a325e4b98
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/app/legend/qgslegend.cpp
@@ -2037,6 +2037,7 @@ void QgsLegend::handleItemChange( QTreeWidgetItem* item, int column )

bool changing = mChanging;
mChanging = true;
bool mapCanvasFrozen = mMapCanvas->isFrozen(); //save freeze state

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

// update layer set
updateMapCanvasLayerSet();

0 comments on commit c0b7208

Please sign in to comment.