summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2009-08-09 12:11:19 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2009-08-09 12:11:19 +0000
commiteefa2f85383f1de298bbf40ca3a397f2bcb4efc1 (patch)
treed8a5e78e9fd22f720bc64474725d52e02462c78c
parentWhen snapping while translating, use the bounding box corners of each selecte... (diff)
downloadinkscape-eefa2f85383f1de298bbf40ca3a397f2bcb4efc1.tar.gz
inkscape-eefa2f85383f1de298bbf40ca3a397f2bcb4efc1.zip
When translating too many items, then don't use the bbox of the selection as a whole but instead use the closest corner of one of the individual bboxes instead.
(bzr r8450)
-rw-r--r--src/seltrans.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 8f060725b..359038527 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -333,9 +333,9 @@ void Inkscape::SelTrans::grab(Geom::Point const &p, gdouble x, gdouble y, bool s
// stroke width. (see get_scale_transform_with_stroke()). This however is currently only implemented for a single bbox.
// That's why we have both _bbox_points_for_translating and _bbox_points.
getBBoxPoints(selection->bounds(_snap_bbox_type), &_bbox_points, false, true, emp, mp);
- if ((_items.size() > 0) && (_items.size() < 50)) { // more than 50 items will produce at least 200 bbox points, which might
- // make Inkscape crawl (see the comment a few lines above). In that case we will use the bbox of the selection
- // as a whole
+ if (((_items.size() > 0) && (_items.size() < 50)) || prefs->getBool("/options/snapclosestonly/value", false)) {
+ // More than 50 items will produce at least 200 bbox points, which might make Inkscape crawl
+ // (see the comment a few lines above). In that case we will use the bbox of the selection as a whole
for (unsigned i = 0; i < _items.size(); i++) {
getBBoxPoints(sp_item_bbox_desktop(_items[i], _snap_bbox_type), &_bbox_points_for_translating, false, true, emp, mp);
}