Skip to content
Permalink
Browse files

Don't zoomToSelected when nothing selected

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12460 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
borysiasty
borysiasty committed Dec 14, 2009
1 parent 4594371 commit 57855ad097002e733acf1248c08a7e378b148899
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gui/qgsmapcanvas.cpp
@@ -658,6 +658,11 @@ void QgsMapCanvas::zoomToSelected( QgsVectorLayer* layer )
return;
}

if ( layer->selectedFeatureCount() == 0 )
{
return;
}

QgsRectangle rect = mMapRenderer->layerExtentToOutputExtent( layer, layer->boundingBoxOfSelected() );

// no selected features, only one selected point feature

0 comments on commit 57855ad

Please sign in to comment.
You can’t perform that action at this time.