summaryrefslogtreecommitdiffstats
path: root/src/rect-context.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mailat-signdiedenrezidotnl>2010-01-30 22:04:33 +0000
committerDiederik van Lierop <mailat-signdiedenrezidotnl>2010-01-30 22:04:33 +0000
commite52fb9fac3f1bbd924c0ca3b6b5e214a095d44af (patch)
tree05abc6241c288c5adf39733b914059e393f2fc75 /src/rect-context.cpp
parentReally fix btool build. (diff)
downloadinkscape-e52fb9fac3f1bbd924c0ca3b6b5e214a095d44af.tar.gz
inkscape-e52fb9fac3f1bbd924c0ca3b6b5e214a095d44af.zip
Finally introducing the pre-snap indicator
(bzr r9034)
Diffstat (limited to 'src/rect-context.cpp')
-rw-r--r--src/rect-context.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index dcc1f0aa1..9eab188dd 100644
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
@@ -317,6 +317,13 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent
sp_rect_drag(*rc, motion_dt, event->motion.state); // this will also handle the snapping
gobble_motion_events(GDK_BUTTON1_MASK);
ret = TRUE;
+ } else if (sp_event_context_knot_mouseover(rc)) {
+ SnapManager &m = desktop->namedview->snap_manager;
+ m.setup(desktop);
+
+ Geom::Point const motion_w(event->motion.x, event->motion.y);
+ Geom::Point motion_dt(desktop->w2d(motion_w));
+ m.preSnap(Inkscape::SnapCandidatePoint(motion_dt, Inkscape::SNAPSOURCE_NODE_HANDLE));
}
break;
case GDK_BUTTON_RELEASE: