summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2011-10-15 12:36:28 +0000
committerDiederik van Lierop <mail@diedenrezi.nl>2011-10-15 12:36:28 +0000
commitc3790882a616125eebcd488db9f08e5388b82d9e (patch)
treea4cbf6fbef34c40203ffeb7ed2726ac74c716334 /src
parentDutch translation update (diff)
downloadinkscape-c3790882a616125eebcd488db9f08e5388b82d9e.tar.gz
inkscape-c3790882a616125eebcd488db9f08e5388b82d9e.zip
Use desktop coordinates for finding snap candidates (regression introduced in rev. #10675)
Fixed bugs: - https://launchpad.net/bugs/874213 (bzr r10677)
Diffstat (limited to 'src')
-rw-r--r--src/object-snapper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index 68e63a0c1..bf8cf166a 100644
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
@@ -149,7 +149,7 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent,
// insert an additional transformation in document coordinates (code copied from sp_item_i2d_affine)
bbox_of_item = item->bounds(bbox_type, item->i2doc_affine() * additional_affine * _snapmanager->getDesktop()->doc2dt());
} else {
- bbox_of_item = item->bounds(bbox_type);
+ bbox_of_item = item->desktopBounds(bbox_type);
}
if (bbox_of_item) {
// See if the item is within range
@@ -183,7 +183,7 @@ void Inkscape::ObjectSnapper::_collectNodes(SnapSourceType const &t,
bool p_is_a_node = t & SNAPSOURCE_NODE_CATEGORY;
bool p_is_a_bbox = t & SNAPSOURCE_BBOX_CATEGORY;
- bool p_is_other = t & SNAPSOURCE_OTHERS_CATEGORY || t & SNAPSOURCE_DATUMS_CATEGORY;
+ bool p_is_other = (t & SNAPSOURCE_OTHERS_CATEGORY) || (t & SNAPSOURCE_DATUMS_CATEGORY);
// A point considered for snapping should be either a node, a bbox corner or a guide/other. Pick only ONE!
if (((p_is_a_node && p_is_a_bbox) || (p_is_a_bbox && p_is_other) || (p_is_a_node && p_is_other))) {
@@ -373,7 +373,7 @@ void Inkscape::ObjectSnapper::_collectPaths(Geom::Point /*p*/,
bool p_is_a_node = source_type & SNAPSOURCE_NODE_CATEGORY;
bool p_is_a_bbox = source_type & SNAPSOURCE_BBOX_CATEGORY;
- bool p_is_other = source_type & SNAPSOURCE_OTHERS_CATEGORY || source_type & SNAPSOURCE_DATUMS_CATEGORY;
+ bool p_is_other = (source_type & SNAPSOURCE_OTHERS_CATEGORY) || (source_type & SNAPSOURCE_DATUMS_CATEGORY);
if (_snapmanager->snapprefs.isTargetSnappable(SNAPTARGET_BBOX_EDGE)) {
Preferences *prefs = Preferences::get();