Skip to content
Permalink
Browse files

fix error in scale optimization (#9081)

  • Loading branch information
3nids committed Feb 4, 2019
1 parent 95e216c commit 513f7ea56b5a1c2e75ccd1eec073881a8a53b909
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/gui/qgsmapcanvas.cpp
@@ -15,6 +15,7 @@ email : sherman at mrcc.com
* *
***************************************************************************/

#include <cmath>

#include <QtGlobal>
#include <QApplication>
@@ -68,7 +69,6 @@ email : sherman at mrcc.com
#include "qgsmapthemecollection.h"
#include "qgscoordinatetransformcontext.h"
#include "qgssvgcache.h"
#include <cmath>

/**
* \ingroup gui
@@ -1010,7 +1010,7 @@ void QgsMapCanvas::zoomToSelected( QgsVectorLayer *layer )
QgsFeatureIterator fit = layer->getFeatures( req );
QgsFeature f;
QgsPointXY closestPoint;
double closestSquaredDistance = extentRect.width() + extentRect.height();
double closestSquaredDistance = pow( extentRect.width(), 2.0 ) + pow( extentRect.height(), 2.0 );
bool pointFound = false;
while ( fit.nextFeature( f ) )
{

0 comments on commit 513f7ea

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