Skip to content

Commit 1f49249

Browse files
author
g_j_m
committed
Fix the problem where trying to digitise on an empty map never gave
visible features. ZoomFullExtent now only does that if the 'full extent' is not an empty extent (zero width/height). This was possibly part of the problem in ticket #219 git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5671 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 50b39b6 commit 1f49249

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/gui/qgsmapcanvas.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,10 @@ void QgsMapCanvas::clear()
414414

415415
void QgsMapCanvas::zoomFullExtent()
416416
{
417-
setExtent(fullExtent());
417+
QgsRect extent = fullExtent();
418+
// If the full extent is an empty set, don't do the zoom
419+
if (!extent.isEmpty())
420+
setExtent(extent);
418421
refresh();
419422

420423
} // zoomFullExtent

0 commit comments

Comments
 (0)