mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
optimize scale for point layers in QgsMapCanvas::zoomToFeatureIds
similarly to what is done in zoomToSelected
This commit is contained in:
parent
b47346ba20
commit
8d385be9bd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user