summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ade0885)
raw | patch | inline | side by side (parent: ade0885)
author | speleo3 <speleo3@users.sourceforge.net> | |
Thu, 11 Dec 2008 11:37:24 +0000 (11:37 +0000) | ||
committer | speleo3 <speleo3@users.sourceforge.net> | |
Thu, 11 Dec 2008 11:37:24 +0000 (11:37 +0000) |
src/nodepath.cpp | patch | blob | history |
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 1dcf3ed459400f66887698c9716d4a7a6606d042..f284d818e85111c2d984c788ecdeeb62352f4ae1 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
@@ -132,7 +132,7 @@ static gboolean node_request(SPKnot *knot, Geom::Point const &p, guint state, gp
static void node_handle_clicked(SPKnot *knot, guint state, gpointer data);
static void node_handle_grabbed(SPKnot *knot, guint state, gpointer data);
static void node_handle_ungrabbed(SPKnot *knot, guint state, gpointer data);
-static gboolean node_handle_request(SPKnot *knot, Geom::Point const &p, guint state, gpointer data);
+static gboolean node_handle_request(SPKnot *knot, Geom::Point &p, guint state, gpointer data);
static void node_handle_moved(SPKnot *knot, Geom::Point const &p, guint state, gpointer data);
static gboolean node_handle_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::Node *n);
/**
* Node handle "request" signal callback.
*/
-static gboolean node_handle_request(SPKnot *knot, Geom::Point const &p, guint state, gpointer data)
+static gboolean node_handle_request(SPKnot *knot, Geom::Point &p, guint state, gpointer data)
{
Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) data;
@@ -3948,13 +3948,12 @@ static gboolean node_handle_request(SPKnot *knot, Geom::Point const &p, guint st
Inkscape::NodePath::Node *othernode = opposite->other;
Geom::Point const ndelta = n->pos - othernode->pos;
Geom::Coord const linelen = Geom::L2(ndelta);
- Geom::Point ptemp = p;
if (len > NR_EPSILON && linelen > NR_EPSILON) {
Geom::Coord const scal = dot(delta, ndelta) / linelen;
- ptemp = n->pos + (scal / linelen) * ndelta;
+ p = n->pos + (scal / linelen) * ndelta;
}
if ((state & GDK_SHIFT_MASK) == 0) {
- s = m.constrainedSnap(Inkscape::SnapPreferences::SNAPPOINT_NODE, ptemp, Inkscape::Snapper::ConstraintLine(ptemp, ndelta));
+ s = m.constrainedSnap(Inkscape::SnapPreferences::SNAPPOINT_NODE, p, Inkscape::Snapper::ConstraintLine(p, ndelta));
}
} else {
if ((state & GDK_SHIFT_MASK) == 0) {
@@ -3967,6 +3966,8 @@ static gboolean node_handle_request(SPKnot *knot, Geom::Point const &p, guint st
}
}
+ s.getPoint(p);
+
sp_node_adjust_handle(n, -which);
return FALSE;