Skip to content
Permalink
Browse files

Part fix for ticket #80. Zoom to features are buffered slightly.

Doesn't yet work correctly for a single selected point yet...


git-svn-id: http://svn.osgeo.org/qgis/trunk@5284 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m
g_j_m committed Apr 16, 2006
1 parent 4f69a86 commit ca7c535972e5e3c8c947d4db845f32932bb8cf6b
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/gui/qgsmapcanvas.cpp
@@ -513,13 +513,10 @@ void QgsMapCanvas::zoomToSelected()
//zoom to an area
else
{
// TODO: why such complicated way? [MD]
QgsRect r;
r.setXmin(rect.xMin());
r.setYmin(rect.yMin());
r.setXmax(rect.xMax());
r.setYmax(rect.yMax());
setExtent(r);
// Expand rect to give a bit of space around the selected
// objects so as to keep them clear of the map boundaries
rect.expand(1.1);
setExtent(rect);
refresh();
return;
}

0 comments on commit ca7c535

Please sign in to comment.
You can’t perform that action at this time.