diff --git a/src/gui/qgsmapcanvas.cpp b/src/gui/qgsmapcanvas.cpp index 4554590a4ad..b93f96e6fee 100644 --- a/src/gui/qgsmapcanvas.cpp +++ b/src/gui/qgsmapcanvas.cpp @@ -1338,6 +1338,10 @@ void QgsMapCanvas::zoomToFeatureIds( QgsVectorLayer *layer, const QgsFeatureIds QString errorMsg; if ( boundingBoxOfFeatureIds( ids, layer, bbox, errorMsg ) ) { + if ( bbox.isEmpty() ) + { + bbox = optimalExtentForPointLayer( layer, bbox.center() ); + } zoomToFeatureExtent( bbox ); } else