diff options
| author | Alvin Penner <penner@vaxxine.com> | 2012-02-04 21:32:10 +0000 |
|---|---|---|
| committer | apenner <penner@vaxxine.com> | 2012-02-04 21:32:10 +0000 |
| commit | e7281159491626d03d4a9d95b853ea90567e274a (patch) | |
| tree | caab0f4900c913715291afdece2151082ac1e7f4 /src/widgets/desktop-widget.cpp | |
| parent | cppcheck tells us: scanf without field width limits can crash with huge input... (diff) | |
| download | inkscape-e7281159491626d03d4a9d95b853ea90567e274a.tar.gz inkscape-e7281159491626d03d4a9d95b853ea90567e274a.zip | |
implement some switches between visual bbox and geometric bbox, depending on prefs (Bug 906952)
Fixed bugs:
- https://launchpad.net/bugs/906952
(bzr r10935)
Diffstat (limited to 'src/widgets/desktop-widget.cpp')
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 5b07cddf5..66777cf6a 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -1899,7 +1899,12 @@ sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale) Geom::Rect darea ( Geom::Point(-doc->getWidth(), -doc->getHeight()), Geom::Point(2 * doc->getWidth(), 2 * doc->getHeight()) ); - Geom::OptRect deskarea = darea | doc->getRoot()->desktopVisualBounds(); + Geom::OptRect deskarea; + if (Inkscape::Preferences::get()->getInt("/tools/bounding_box") == 0) { + deskarea = darea | doc->getRoot()->desktopVisualBounds(); + } else { + deskarea = darea | doc->getRoot()->desktopGeometricBounds(); + } /* Canvas region we always show unconditionally */ Geom::Rect carea( Geom::Point(deskarea->min()[Geom::X] * scale - 64, deskarea->max()[Geom::Y] * -scale - 64), |
