File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ email : sherman at mrcc.com
15
15
* *
16
16
***************************************************************************/
17
17
18
+ #include < cmath>
18
19
19
20
#include < QtGlobal>
20
21
#include < QApplication>
@@ -69,7 +70,6 @@ email : sherman at mrcc.com
69
70
#include " qgscoordinatetransformcontext.h"
70
71
#include " qgssvgcache.h"
71
72
#include " qgsimagecache.h"
72
- #include < cmath>
73
73
74
74
/* *
75
75
* \ingroup gui
@@ -1010,7 +1010,7 @@ void QgsMapCanvas::zoomToSelected( QgsVectorLayer *layer )
1010
1010
QgsFeatureIterator fit = layer->getFeatures ( req );
1011
1011
QgsFeature f;
1012
1012
QgsPointXY closestPoint;
1013
- double closestSquaredDistance = extentRect.width () + extentRect.height ();
1013
+ double closestSquaredDistance = pow ( extentRect.width (), 2.0 ) + pow ( extentRect.height (), 2.0 );
1014
1014
bool pointFound = false ;
1015
1015
while ( fit.nextFeature ( f ) )
1016
1016
{
You can’t perform that action at this time.
0 commit comments