summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 10850f5)
raw | patch | inline | side by side (parent: 10850f5)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Tue, 31 Mar 2009 20:41:19 +0000 (20:41 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Tue, 31 Mar 2009 20:41:19 +0000 (20:41 +0000) |
src/object-snapper.cpp | patch | blob | history |
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index e0506c8e2a63509d136da6500694b599e34cb5f5..0ec1a7ba51992c28803a8b3ede7e57bb26bb67bd 100644 (file)
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
@@ -297,7 +297,6 @@ void Inkscape::ObjectSnapper::_snapTranslatingGuideToNodes(SnappedConstraints &s
_collectNodes(t, true);
SnappedPoint s;
- bool success = false;
Geom::Coord tol = getSnapperTolerance();
@@ -306,15 +305,12 @@ void Inkscape::ObjectSnapper::_snapTranslatingGuideToNodes(SnappedConstraints &s
Geom::Point p_proj = Geom::projection((*k).first, Geom::Line(p, p + Geom::rot90(guide_normal)));
Geom::Coord dist = Geom::L2((*k).first - p_proj); // distance from node to the guide
Geom::Coord dist2 = Geom::L2(p - p_proj); // distance from projection of node on the guide, to the mouse location
- if ((dist < tol && dist2 < tol) || (getSnapperAlwaysSnap() && dist < s.getSnapDistance())) {
+ std::cout << "d1 = " << dist << " | d2 = " << dist2 << " | tol = " << tol << std::endl;
+ if ((dist < tol && dist2 < tol) || getSnapperAlwaysSnap()) {
s = SnappedPoint((*k).first, SNAPSOURCE_GUIDE, static_cast<Inkscape::SnapTargetType>((*k).second), dist, tol, getSnapperAlwaysSnap(), true);
- success = true;
+ sc.points.push_back(s);
}
}
-
- if (success) {
- sc.points.push_back(s);
- }
}