Skip to content
Permalink
Browse files

Fix zoom to visibile scale when min/max scale is set to 0

  • Loading branch information
nyalldawson committed Jun 8, 2017
1 parent 10707b8 commit f7bfb9ceea402eb2f4c236f31d124ab4abdd8ceb
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/app/qgisapp.cpp
@@ -9010,11 +9010,11 @@ void QgisApp::zoomToLayerScale()
if ( layer && layer->hasScaleBasedVisibility() )
{
const double scale = mMapCanvas->scale();
if ( scale > layer->minimumScale() )
if ( scale > layer->minimumScale() && layer->minimumScale() > 0 )
{
mMapCanvas->zoomScale( layer->minimumScale() * Qgis::SCALE_PRECISION );
}
else if ( scale <= layer->maximumScale() )
else if ( scale <= layer->maximumScale() && layer->maximumScale() > 0 )
{
mMapCanvas->zoomScale( layer->maximumScale() );
}

0 comments on commit f7bfb9c

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