Skip to content
Permalink
Browse files

Turn off rendering while looping through all layers hinding/showing. F…

…ixes #1856

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11263 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann
homann committed Aug 4, 2009
1 parent 5822acf commit d44fe7933fd3d74ef5e639eaaf747088d91f9dfe
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/legend/qgslegend.cpp
@@ -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 )
@@ -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 )

0 comments on commit d44fe79

Please sign in to comment.
You can’t perform that action at this time.