Skip to content

Commit

Permalink
Part fix for ticket #80. Zoom to features are buffered slightly.
Browse files Browse the repository at this point in the history
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 committed Apr 16, 2006
1 parent 4f69a86 commit ca7c535
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/gui/qgsmapcanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ca7c535

Please sign in to comment.