diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/selection.cpp | 7 | ||||
| -rw-r--r-- | src/seltrans.cpp | 12 | ||||
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 7 |
3 files changed, 22 insertions, 4 deletions
diff --git a/src/selection.cpp b/src/selection.cpp index ff444fa98..412718994 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -425,7 +425,12 @@ boost::optional<Geom::Point> Selection::center() const { return first->getCenter(); } } - Geom::OptRect bbox = visualBounds(); + Geom::OptRect bbox; + if (Inkscape::Preferences::get()->getInt("/tools/bounding_box") == 0) { + bbox = visualBounds(); + } else{ + bbox = geometricBounds(); + } if (bbox) { return bbox->midpoint(); } else { diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 922d13a72..e5a61abd0 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -281,8 +281,12 @@ void Inkscape::SelTrans::grab(Geom::Point const &p, gdouble x, gdouble y, bool s // First, determine the bounding box _bbox = selection->bounds(_snap_bbox_type); - _visual_bbox = selection->visualBounds(); // Used for correctly scaling the strokewidth _geometric_bbox = selection->geometricBounds(); + if (prefs->getInt("/tools/bounding_box") == 0) { + _visual_bbox = selection->visualBounds(); // Used for correctly scaling the strokewidth + } else { + _visual_bbox = _geometric_bbox; + } _point = p; if (_geometric_bbox) { @@ -653,7 +657,11 @@ void Inkscape::SelTrans::_updateVolatileState() //Update the bboxes _bbox = selection->bounds(_snap_bbox_type); - _visual_bbox = selection->visualBounds(); + if (Inkscape::Preferences::get()->getInt("/tools/bounding_box") == 0) { + _visual_bbox = selection->visualBounds(); + } else { + _visual_bbox = selection->geometricBounds(); + } if (!_bbox) { _empty = true; 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), |
