[QGIS Commit] r12460 - trunk/qgis/src/gui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Dec 14 17:28:19 EST 2009
Author: borysiasty
Date: 2009-12-14 17:28:19 -0500 (Mon, 14 Dec 2009)
New Revision: 12460
Modified:
trunk/qgis/src/gui/qgsmapcanvas.cpp
Log:
Don't zoomToSelected when nothing selected
Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp 2009-12-14 22:25:04 UTC (rev 12459)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp 2009-12-14 22:28:19 UTC (rev 12460)
@@ -658,6 +658,11 @@
return;
}
+ if ( layer->selectedFeatureCount() == 0 )
+ {
+ return;
+ }
+
QgsRectangle rect = mMapRenderer->layerExtentToOutputExtent( layer, layer->boundingBoxOfSelected() );
// no selected features, only one selected point feature
More information about the QGIS-commit
mailing list