summaryrefslogtreecommitdiffstats
path: root/src/nodepath.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-05-12 18:58:04 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-05-12 18:58:04 +0000
commitde27d953d1c13d2e7563b43c2d959b1b02aee9c3 (patch)
treeefc8ed7eaba9a2b0ed87eaf14b797103bd8fa33a /src/nodepath.cpp
parentfix typo (diff)
downloadinkscape-de27d953d1c13d2e7563b43c2d959b1b02aee9c3.tar.gz
inkscape-de27d953d1c13d2e7563b43c2d959b1b02aee9c3.zip
Add a centralized check (i.e. in the snapper mechanism) whether we've snapped or not, instead of leaving it up to the various tools. This should prevent these tools from moving to (0,0) if they bluntly use the value returned by the snapping mechanism without checking whether snapping has really occured.
(bzr r5659)
Diffstat (limited to 'src/nodepath.cpp')
-rw-r--r--src/nodepath.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index c3d0f09b4..ffbec8a8b 100644
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
@@ -1233,7 +1233,7 @@ static void sp_nodepath_selected_nodes_move(Inkscape::NodePath::Path *nodepath,
Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) l->data;
m.setup(nodepath->desktop, SP_PATH(n->subpath->nodepath->item), &unselected_nodes);
Inkscape::SnappedPoint s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, n->pos + delta);
- if (s.getDistance() < best) {
+ if (s.getSnapped() && (s.getDistance() < best)) {
best = s.getDistance();
best_abs = s;
best_pt = s.getPoint() - n->pos;
@@ -3684,8 +3684,8 @@ static gboolean node_handle_request(SPKnot *knot, NR::Point *p, guint /*state*/,
s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, *p);
}
- *p = s.getPoint();
-
+ s.getPoint(*p);
+
sp_node_adjust_handle(n, -which);
return FALSE;