Skip to content

Commit d32af93

Browse files
author
borysiasty
committedDec 14, 2009
Don't zoomToSelected when nothing selected
git-svn-id: http://svn.osgeo.org/qgis/trunk@12460 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 961601c commit d32af93

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/gui/qgsmapcanvas.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,11 @@ void QgsMapCanvas::zoomToSelected( QgsVectorLayer* layer )
658658
return;
659659
}
660660

661+
if ( layer->selectedFeatureCount() == 0 )
662+
{
663+
return;
664+
}
665+
661666
QgsRectangle rect = mMapRenderer->layerExtentToOutputExtent( layer, layer->boundingBoxOfSelected() );
662667

663668
// no selected features, only one selected point feature

0 commit comments

Comments
 (0)
Please sign in to comment.