Skip to content
Permalink
Browse files

optimize scale for point layers in QgsMapCanvas::zoomToFeatureIds

similarly to what is done in zoomToSelected
  • Loading branch information
3nids committed Sep 21, 2020
1 parent b47346b commit 8d385be9bd8177517f05b016a66cefd90f842403
Showing with 4 additions and 0 deletions.
  1. +4 −0 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

0 comments on commit 8d385be

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