From: Krzysztof KosiƄski Date: Wed, 17 Mar 2010 23:55:48 +0000 (+0100) Subject: Fix Ctrl-drag in node tool with zero snap delay. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0c96a768704b4b4294ef5c76d3410d0051fa1ec1;p=inkscape.git Fix Ctrl-drag in node tool with zero snap delay. --- diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index ebf30cc77..c82b0c7d6 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -1006,11 +1006,11 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event) // TODO: combine the snap and non-snap branches by modifying snap.h / snap.cpp if (snap) { if (line_front) { - fp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), + fp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(new_pos, _snapSourceType()), *line_front); } if (line_back) { - bp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), + bp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(new_pos, _snapSourceType()), *line_back); } } @@ -1042,8 +1042,8 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event) if (snap) { Inkscape::Snapper::ConstraintLine line_x(origin, Geom::Point(1, 0)); Inkscape::Snapper::ConstraintLine line_y(origin, Geom::Point(0, 1)); - fp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_x); - bp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(position(), _snapSourceType()), line_y); + fp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(new_pos, _snapSourceType()), line_x); + bp = sm.constrainedSnap(Inkscape::SnapCandidatePoint(new_pos, _snapSourceType()), line_y); } if (fp.getSnapped() || bp.getSnapped()) { if (fp.isOtherSnapBetter(bp, false)) {