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/ui/tool/node.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/ui/tool/node.cpp')
| -rw-r--r-- | src/ui/tool/node.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index ef98e7c84..f2bec1f5f 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -847,7 +847,6 @@ void Node::_draggedHandler(Geom::Point &new_pos, GdkEventMotion *event) { // For a note on how snapping is implemented in Inkscape, see snap.h. SnapManager &sm = _desktop->namedview->snap_manager; - Inkscape::SnapPreferences::PointType t = Inkscape::SnapPreferences::SNAPPOINT_NODE; bool snap = sm.someSnapperMightSnap(); std::vector<Inkscape::SnapCandidatePoint> unselected; if (snap) { @@ -882,8 +881,8 @@ void Node::_draggedHandler(Geom::Point &new_pos, GdkEventMotion *event) // TODO: combine these two branches by modifying snap.h / snap.cpp if (snap) { Inkscape::SnappedPoint fp, bp; - fp = sm.constrainedSnap(t, Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_front); - bp = sm.constrainedSnap(t, Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_back); + fp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_front); + bp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_back); if (fp.isOtherSnapBetter(bp, false)) { bp.getPoint(new_pos); @@ -906,8 +905,8 @@ void Node::_draggedHandler(Geom::Point &new_pos, GdkEventMotion *event) Inkscape::SnappedPoint fp, bp; Inkscape::Snapper::ConstraintLine line_x(origin, Geom::Point(1, 0)); Inkscape::Snapper::ConstraintLine line_y(origin, Geom::Point(0, 1)); - fp = sm.constrainedSnap(t, Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_x); - bp = sm.constrainedSnap(t, Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_y); + fp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_x); + bp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_y); if (fp.isOtherSnapBetter(bp, false)) { fp = bp; @@ -921,7 +920,7 @@ void Node::_draggedHandler(Geom::Point &new_pos, GdkEventMotion *event) } } } else if (snap) { - sm.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, new_pos, _snapSourceType()); + sm.freeSnapReturnByRef(new_pos, _snapSourceType()); } } |
