Skip to content
Permalink
Browse files
Fix for nan extents when using the 'zoom out' tool and height or widt…
…h of window is 0

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6068 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 10, 2006
1 parent 09d8b56 commit a72005e
Showing 1 changed file with 8 additions and 1 deletion.
@@ -91,13 +91,20 @@ void QgsMapToolZoom::canvasReleaseEvent(QMouseEvent * e)
double sf;
if (mZoomRect.width() > mZoomRect.height())
{
if(r.width() == 0)//prevent nan map extent
{
return;
}
sf = extent.width() / r.width();
}
else
{
if(r.height() == 0)//prevent nan map extent
{
return;
}
sf = extent.height() / r.height();
}

r.expand(sf);

#ifdef QGISDEBUG

0 comments on commit a72005e

Please sign in to comment.