Skip to content

Commit d766add

Browse files
author
alexbruy
committedApr 16, 2011
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
1 parent 09aa281 commit d766add

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/app/legend/qgslegend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ void QgsLegend::addLayer( QgsMapLayer * layer )
649649
updateMapCanvasLayerSet();
650650

651651
// first layer?
652-
if ( mMapCanvas->layerCount() == 1 )
652+
if ( QgsMapLayerRegistry::instance()->count() == 1 )
653653
{
654654
mMapCanvas->zoomToFullExtent();
655655
mMapCanvas->clearExtentHistory();

0 commit comments

Comments
 (0)
Please sign in to comment.