diff options
| author | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-01-23 13:36:56 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-01-23 13:36:56 +0000 |
| commit | c4aa590bedcf358acf15bdf0d8134ae99e3be167 (patch) | |
| tree | 6808d0d57dfb83e91d02762c3c12225f1053c83e /src/knot-holder-entity.cpp | |
| parent | Fix some of the LPE issues. (diff) | |
| download | inkscape-c4aa590bedcf358acf15bdf0d8134ae99e3be167.tar.gz inkscape-c4aa590bedcf358acf15bdf0d8134ae99e3be167.zip | |
Remove redundancy from snapping API (type of snapsource no longer has to be specified explicitly)
(bzr r9014)
Diffstat (limited to 'src/knot-holder-entity.cpp')
| -rw-r--r-- | src/knot-holder-entity.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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(); |
