From 66a5d8abdc01c524d02064b537d7b0d167b15dda Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Fri, 13 Mar 2009 20:15:31 +0000 Subject: * Implement constrained snapping of knots * Implement snapping of the rectangle's radius handles * Line snappers: set the snap target in the derived class instead of in findBestSnap() (bzr r7479) --- src/line-snapper.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/line-snapper.cpp') diff --git a/src/line-snapper.cpp b/src/line-snapper.cpp index d751993dd..72a6cc33d 100644 --- a/src/line-snapper.cpp +++ b/src/line-snapper.cpp @@ -51,8 +51,7 @@ void Inkscape::LineSnapper::freeSnap(SnappedConstraints &sc, Geom::Coord const dist = Geom::L2(p_proj - p); //Store any line that's within snapping range if (dist < getSnapperTolerance()) { - _addSnappedLine(sc, p_proj, dist, source_type, Inkscape::SNAPTARGET_UNDEFINED, i->first, i->second); - // We don't know if we're snapping to grids or guides here; therefore the snap target type will be set in findBestSnap() + _addSnappedLine(sc, p_proj, dist, source_type, i->first, i->second); // std::cout << " -> distance = " << dist; } // std::cout << std::endl; @@ -100,7 +99,7 @@ void Inkscape::LineSnapper::constrainedSnap(SnappedConstraints &sc, // This snappoint is therefore fully constrained, so there's no need // to look for additional intersections; just return the snapped point // and forget about the line - sc.points.push_back(SnappedPoint(t, source_type, Inkscape::SNAPTARGET_UNDEFINED, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), true)); + _addSnappedPoint(sc, t, dist, source_type); } } } -- cgit v1.2.3