We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent ae84522 commit ca799f4Copy full SHA for ca799f4
src/gui/qgsmapcanvas.cpp
@@ -513,13 +513,10 @@ void QgsMapCanvas::zoomToSelected()
513
//zoom to an area
514
else
515
{
516
- // TODO: why such complicated way? [MD]
517
- QgsRect r;
518
- r.setXmin(rect.xMin());
519
- r.setYmin(rect.yMin());
520
- r.setXmax(rect.xMax());
521
- r.setYmax(rect.yMax());
522
- 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);
523
refresh();
524
return;
525
}
0 commit comments