We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10707b8 commit f7bfb9cCopy full SHA for f7bfb9c
src/app/qgisapp.cpp
@@ -9010,11 +9010,11 @@ void QgisApp::zoomToLayerScale()
9010
if ( layer && layer->hasScaleBasedVisibility() )
9011
{
9012
const double scale = mMapCanvas->scale();
9013
- if ( scale > layer->minimumScale() )
+ if ( scale > layer->minimumScale() && layer->minimumScale() > 0 )
9014
9015
mMapCanvas->zoomScale( layer->minimumScale() * Qgis::SCALE_PRECISION );
9016
}
9017
- else if ( scale <= layer->maximumScale() )
+ else if ( scale <= layer->maximumScale() && layer->maximumScale() > 0 )
9018
9019
mMapCanvas->zoomScale( layer->maximumScale() );
9020
0 commit comments