Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use layer count from QgsMapLayerRegistry instead of QgsMapCanvas. Fixes
#2762

git-svn-id: http://svn.osgeo.org/qgis/trunk@15721 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
alexbruy committed Apr 16, 2011
1 parent 09aa281 commit d766add
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/legend/qgslegend.cpp
Expand Up @@ -649,7 +649,7 @@ void QgsLegend::addLayer( QgsMapLayer * layer )
updateMapCanvasLayerSet();

// first layer?
if ( mMapCanvas->layerCount() == 1 )
if ( QgsMapLayerRegistry::instance()->count() == 1 )
{
mMapCanvas->zoomToFullExtent();
mMapCanvas->clearExtentHistory();
Expand Down

0 comments on commit d766add

Please sign in to comment.