summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6fc0952)
raw | patch | inline | side by side (parent: 6fc0952)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Mon, 21 Jul 2008 21:28:17 +0000 (21:28 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Mon, 21 Jul 2008 21:28:17 +0000 (21:28 +0000) |
src/nodepath.cpp | patch | blob | history |
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 023f931f21b192834737fee934809f24a75a3f97..387cf1b0a3308ea848714bd7789ffa12093f0748 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
/**
* Node handle "request" signal callback.
*/
-static gboolean node_handle_request(SPKnot *knot, NR::Point *p, guint /*state*/, gpointer data)
+static gboolean node_handle_request(SPKnot *knot, NR::Point *p, guint state, gpointer data)
{
Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) data;
@@ -3725,7 +3725,13 @@ static gboolean node_handle_request(SPKnot *knot, NR::Point *p, guint /*state*/,
SPDesktop *desktop = n->subpath->nodepath->desktop;
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop, n->subpath->nodepath->item);
- Inkscape::SnappedPoint s ;
+ Inkscape::SnappedPoint s;
+
+ if ((state & GDK_SHIFT_MASK) != 0) {
+ // We will not try to snap when the shift-key is pressed
+ // so remove the old snap indicator and don't wait for it to time-out
+ desktop->snapindicator->remove_snappoint();
+ }
Inkscape::NodePath::Node *othernode = opposite->other;
if (othernode) {
@@ -3740,12 +3746,18 @@ static gboolean node_handle_request(SPKnot *knot, NR::Point *p, guint /*state*/,
NR::Coord const scal = dot(delta, ndelta) / linelen;
(*p) = n->pos + (scal / linelen) * ndelta;
}
- s = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE, *p, Inkscape::Snapper::ConstraintLine(*p, ndelta));
+ if ((state & GDK_SHIFT_MASK) == 0) {
+ s = m.constrainedSnap(Inkscape::Snapper::SNAPPOINT_NODE, *p, Inkscape::Snapper::ConstraintLine(*p, ndelta));
+ }
} else {
- s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, *p);
+ if ((state & GDK_SHIFT_MASK) == 0) {
+ s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, *p);
+ }
}
} else {
- s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, *p);
+ if ((state & GDK_SHIFT_MASK) == 0) {
+ s = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, *p);
+ }
}
s.getPoint(*p);