summaryrefslogtreecommitdiffstats
path: root/src/spiral-context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/spiral-context.cpp')
-rw-r--r--src/spiral-context.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index 3825f74c7..7ce9d4710 100644
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
@@ -241,9 +241,7 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
- Geom::Point pt2g = to_2geom(sc->center);
- m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, pt2g, Inkscape::SNAPSOURCE_HANDLE);
- sc->center = from_2geom(pt2g);
+ m.freeSnapReturnByRef(sc->center, Inkscape::SNAPSOURCE_NODE_HANDLE);
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
( GDK_KEY_PRESS_MASK |
@@ -273,12 +271,19 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop, true, sc->item);
- m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, motion_dt, Inkscape::SNAPSOURCE_HANDLE);
+ m.freeSnapReturnByRef(motion_dt, Inkscape::SNAPSOURCE_NODE_HANDLE);
sp_spiral_drag(sc, from_2geom(motion_dt), event->motion.state);
gobble_motion_events(GDK_BUTTON1_MASK);
ret = TRUE;
+ } else if (!sp_event_context_knot_mouseover(sc)) {
+ 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:
@@ -424,7 +429,7 @@ sp_spiral_drag(SPSpiralContext *sc, Geom::Point p, guint state)
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop, true, sc->item);
Geom::Point pt2g = to_2geom(p);
- m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, pt2g, Inkscape::SNAPSOURCE_HANDLE);
+ m.freeSnapReturnByRef(pt2g, Inkscape::SNAPSOURCE_NODE_HANDLE);
Geom::Point const p0 = desktop->dt2doc(sc->center);
Geom::Point const p1 = desktop->dt2doc(pt2g);