Skip to content

Commit

Permalink
Fix the problem where trying to digitise on an empty map never gave
Browse files Browse the repository at this point in the history
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
  • Loading branch information
g_j_m committed Aug 8, 2006
1 parent 50b39b6 commit 1f49249
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/qgsmapcanvas.cpp
Expand Up @@ -414,7 +414,10 @@ void QgsMapCanvas::clear()

void QgsMapCanvas::zoomFullExtent()
{
setExtent(fullExtent());
QgsRect extent = fullExtent();
// If the full extent is an empty set, don't do the zoom
if (!extent.isEmpty())
setExtent(extent);
refresh();

} // zoomFullExtent
Expand Down

0 comments on commit 1f49249

Please sign in to comment.