Skip to content

Commit

Permalink
Turn off rendering while looping through all layers hinding/showing. F…
Browse files Browse the repository at this point in the history
…ixes #1856

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11263 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Aug 4, 2009
1 parent 5822acf commit d44fe79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -138,6 +138,10 @@ void QgsLegend::selectAll( bool select )
return;
}

// Turn off rendering to improve speed.
bool renderFlagState = mMapCanvas->renderFlag();
mMapCanvas->setRenderFlag( false );

QTreeWidgetItem* theItem = firstItem();

while ( theItem )
Expand All @@ -150,6 +154,8 @@ void QgsLegend::selectAll( bool select )
}
theItem = nextItem( theItem );
}
// Turn on rendering (if it was on previously)
mMapCanvas->setRenderFlag( renderFlagState );
}

void QgsLegend::removeLayer( QString layer_key )
Expand Down

0 comments on commit d44fe79

Please sign in to comment.