From c4aa590bedcf358acf15bdf0d8134ae99e3be167 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 23 Jan 2010 14:36:56 +0100 Subject: Remove redundancy from snapping API (type of snapsource no longer has to be specified explicitly) (bzr r9014) --- src/knot-holder-entity.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/knot-holder-entity.cpp') diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp index bf7505f3c..2d0d5eb02 100644 --- a/src/knot-holder-entity.cpp +++ b/src/knot-holder-entity.cpp @@ -95,7 +95,7 @@ KnotHolderEntity::snap_knot_position(Geom::Point const &p) SnapManager &m = desktop->namedview->snap_manager; m.setup(desktop, true, item); - m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, s, Inkscape::SNAPSOURCE_HANDLE); + m.freeSnapReturnByRef(s, Inkscape::SNAPSOURCE_NODE_HANDLE); return s * i2d.inverse(); } @@ -119,12 +119,12 @@ KnotHolderEntity::snap_knot_position_constrained(Geom::Point const &p, Inkscape: // freeSnap() will try snapping point p. This will not take into account the constraint, which // is therefore to be enforced after snap_knot_position_constrained() has finished - m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, s, Inkscape::SNAPSOURCE_HANDLE); + m.freeSnapReturnByRef(s, Inkscape::SNAPSOURCE_NODE_HANDLE); } else { // constrainedSnap() will first project the point p onto the constraint line and then try to snap along that line. // This way the constraint is already enforced, no need to worry about that later on Inkscape::Snapper::ConstraintLine transformed_constraint = Inkscape::Snapper::ConstraintLine(constraint.getPoint() * i2d, (constraint.getPoint() + constraint.getDirection()) * i2d - constraint.getPoint() * i2d); - m.constrainedSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, s, Inkscape::SNAPSOURCE_HANDLE, transformed_constraint); + m.constrainedSnapReturnByRef(s, Inkscape::SNAPSOURCE_NODE_HANDLE, transformed_constraint); } return s * i2d.inverse(); -- cgit v1.2.3