From bdf703831ff93438d49324ab842052ccaf390a5d Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 26 Jun 2011 22:00:36 +0200 Subject: =?UTF-8?q?-=20Add=20a=20third=20group=20of=20snap=20sources/targe?= =?UTF-8?q?ts,=20called=20=C2=A8others=C2=A8=20(before=20we=20had=20only?= =?UTF-8?q?=20=C2=A8bounding=20box=C2=A8=20and=20nodes=20(see=20bug=20#788?= =?UTF-8?q?178)=20-=20Fix=20the=20display=20of=20the=20snap=20source=20-?= =?UTF-8?q?=20Fix=20snapping=20of=20guides=20to=20other=20guides=20&=20gri?= =?UTF-8?q?ds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (bzr r10372) --- src/snap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/snap.cpp') diff --git a/src/snap.cpp b/src/snap.cpp index f8fe8e3fa..bf1613d2c 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -916,7 +916,7 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed( // We might still need to apply a constraint though, if we tried a constrained snap. And // in case of a free snap we might have use for the transformed point, so let's return that // point, whether it's constrained or not - if (best_snapped_point.isOtherSnapBetter(snapped_point, true)) { + if (best_snapped_point.isOtherSnapBetter(snapped_point, true) || points.size() == 1) { // .. so we must keep track of the best non-snapped constrained point best_transformation = result; best_snapped_point = snapped_point; @@ -1440,7 +1440,7 @@ void SnapManager::_displaySnapsource(Inkscape::SnapCandidatePoint const &p) cons if (prefs->getBool("/options/snapclosestonly/value")) { bool p_is_a_node = p.getSourceType() & Inkscape::SNAPSOURCE_NODE_CATEGORY; bool p_is_a_bbox = p.getSourceType() & Inkscape::SNAPSOURCE_BBOX_CATEGORY; - bool p_is_other = p.getSourceType() & Inkscape::SNAPSOURCE_OTHER_CATEGORY; + bool p_is_other = p.getSourceType() & Inkscape::SNAPSOURCE_OTHERS_CATEGORY; g_assert(_desktop != NULL); if (snapprefs.getSnapEnabledGlobally() && (p_is_other || (p_is_a_node && snapprefs.getSnapModeNode()) || (p_is_a_bbox && snapprefs.getSnapModeBBox()))) { -- cgit v1.2.3