Skip to content

Commit 0d8416e

Browse files
author
homann
committed
Adds some margin to zoomToLayer. Fixes #881
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7949 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5a30019 commit 0d8416e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/app/legend/qgslegend.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,8 @@ void QgsLegend::legendLayerZoom()
17541754
extent.combineExtentWith(&lyrExtent);
17551755
}
17561756
}
1757+
// Increase bounding box with 5%, so that layer is a bit inside the borders
1758+
extent.scale(1.05);
17571759

17581760
//zoom to bounding box
17591761
mMapCanvas->setExtent(extent);

0 commit comments

Comments
 (0)