Skip to content

Commit

Permalink
Adds some margin to zoomToLayer. Fixes #881
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7949 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Jan 13, 2008
1 parent 5a30019 commit 0d8416e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -1754,6 +1754,8 @@ void QgsLegend::legendLayerZoom()
extent.combineExtentWith(&lyrExtent);
}
}
// Increase bounding box with 5%, so that layer is a bit inside the borders
extent.scale(1.05);

//zoom to bounding box
mMapCanvas->setExtent(extent);
Expand Down

0 comments on commit 0d8416e

Please sign in to comment.