[QGIS Commit] r15721 - trunk/qgis/src/app/legend

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Apr 16 05:57:03 EDT 2011


Author: alexbruy
Date: 2011-04-16 02:57:03 -0700 (Sat, 16 Apr 2011)
New Revision: 15721

Modified:
   trunk/qgis/src/app/legend/qgslegend.cpp
Log:
use layer count from QgsMapLayerRegistry instead of QgsMapCanvas. Fixes #2762


Modified: trunk/qgis/src/app/legend/qgslegend.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.cpp	2011-04-16 08:34:02 UTC (rev 15720)
+++ trunk/qgis/src/app/legend/qgslegend.cpp	2011-04-16 09:57:03 UTC (rev 15721)
@@ -649,7 +649,7 @@
   updateMapCanvasLayerSet();
 
   // first layer?
-  if ( mMapCanvas->layerCount() == 1 )
+  if ( QgsMapLayerRegistry::instance()->count() == 1 )
   {
     mMapCanvas->zoomToFullExtent();
     mMapCanvas->clearExtentHistory();



More information about the QGIS-commit mailing list