We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 09d8b56 commit a72005eCopy full SHA for a72005e
src/gui/qgsmaptoolzoom.cpp
@@ -91,13 +91,20 @@ void QgsMapToolZoom::canvasReleaseEvent(QMouseEvent * e)
91
double sf;
92
if (mZoomRect.width() > mZoomRect.height())
93
{
94
+ if(r.width() == 0)//prevent nan map extent
95
+ {
96
+ return;
97
+ }
98
sf = extent.width() / r.width();
99
}
100
else
101
102
+ if(r.height() == 0)//prevent nan map extent
103
104
105
106
sf = extent.height() / r.height();
107
-
108
r.expand(sf);
109
110
#ifdef QGISDEBUG
0 commit comments