Skip to content

Commit

Permalink
fix error in scale optimization (#9081)
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Feb 4, 2019
1 parent 95e216c commit 513f7ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsmapcanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ email : sherman at mrcc.com
* *
***************************************************************************/

#include <cmath>

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

/**
* \ingroup gui
Expand Down Expand Up @@ -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 ) )
{
Expand Down

0 comments on commit 513f7ea

Please sign in to comment.