summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e4c18de)
raw | patch | inline | side by side (parent: e4c18de)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 4 Mar 2008 20:14:23 +0000 (20:14 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 4 Mar 2008 20:14:23 +0000 (20:14 +0000) |
src/nodepath.cpp | patch | blob | history |
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 7ea29e791327f0cfb9a79d6a833eef7dd3b7cb35..bc396d37845b3da19b1ffce658d8ca1682fe9527 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
#include "live_effects/lpeobject.h"
#include "live_effects/parameter/parameter.h"
#include "util/mathfns.h"
+#include "display/snap-indicator.h"
class NR::Matrix;
@@ -1099,6 +1100,7 @@ static void sp_nodepath_selected_nodes_move(Inkscape::NodePath::Path *nodepath,
NR::Coord best = NR_HUGE;
NR::Point delta(dx, dy);
NR::Point best_pt = delta;
+ NR::Point best_abs(NR_HUGE, NR_HUGE);
if (snap) {
SnapManager const &m = nodepath->desktop->namedview->snap_manager;
@@ -1108,9 +1110,13 @@ static void sp_nodepath_selected_nodes_move(Inkscape::NodePath::Path *nodepath,
Inkscape::SnappedPoint const s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, n->pos + delta, SP_PATH(n->subpath->nodepath->item));
if (s.getDistance() < best) {
best = s.getDistance();
- best_pt = s.getPoint() - n->pos;
+ best_abs = s.getPoint();
+ best_pt = best_abs - n->pos;
}
}
+ if (best_abs[NR::X] < NR_HUGE) {
+ nodepath->desktop->snapindicator->set_new_snappoint(best_abs.to_2geom());
+ }
}
for (GList *l = nodepath->selected; l != NULL; l = l->next) {
Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) data;
+ n->subpath->nodepath->desktop->snapindicator->remove_snappoint();
+
// If either (Shift and some handle retracted), or (we're already dragging out a handle)
if ( (!n->subpath->nodepath->straight_path) &&
( ((state & GDK_SHIFT_MASK) && ((n->n.other && n->n.pos == n->pos) || (n->p.other && n->p.pos == n->pos)))