Skip to content
Permalink
Browse files
use layer count from QgsMapLayerRegistry instead of QgsMapCanvas. Fixes
#2762

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15721 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
alexbruy committed Apr 16, 2011
1 parent ef254ab commit bd3d2aa7f111171593f14f6c2b5ab0ca2e49b056
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/legend/qgslegend.cpp
@@ -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();

0 comments on commit bd3d2aa

Please sign in to comment.