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 9b7ec28 commit bc200feCopy full SHA for bc200fe
src/gui/qgsmapcanvas.cpp
@@ -493,7 +493,11 @@ void QgsMapCanvas::zoomFullExtent()
493
QgsRect extent = fullExtent();
494
// If the full extent is an empty set, don't do the zoom
495
if (!extent.isEmpty())
496
+ {
497
+ // Add a 5% margin around the full extent
498
+ extent.scale(1.05);
499
setExtent(extent);
500
+ }
501
refresh();
502
503
} // zoomFullExtent
@@ -561,7 +565,8 @@ void QgsMapCanvas::zoomToSelected()
561
565
{
562
566
// Expand rect to give a bit of space around the selected
563
567
// objects so as to keep them clear of the map boundaries
564
- rect.scale(1.1);
568
+ // The same 5% should apply to all margins.
569
+ rect.scale(1.05);
570
setExtent(rect);
571
572
return;
0 commit comments