Navigation Menu

Skip to content

Commit

Permalink
Avoid multiple redraws if loading projects
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Apr 3, 2012
1 parent d2fbcfe commit c0b7208
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/legend/qgslegend.cpp
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit c0b7208

Please sign in to comment.