diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index a4c402f407b3f81fb5f98ebf38cda8c7ef1a6f5e..3e431667f25ec3defcab471cd1400c8c605506c1 100644 (file)
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
if (sc->item) sp_spiral_finish(sc);
if (ec->shape_knot_holder) {
- sp_knot_holder_destroy(ec->shape_knot_holder);
+ delete ec->shape_knot_holder;
ec->shape_knot_holder = NULL;
}
@@ -167,7 +167,7 @@ sp_spiral_context_selection_changed(Inkscape::Selection *selection, gpointer dat
SPEventContext *ec = SP_EVENT_CONTEXT(sc);
if (ec->shape_knot_holder) { // desktroy knotholder
- sp_knot_holder_destroy(ec->shape_knot_holder);
+ delete ec->shape_knot_holder;
ec->shape_knot_holder = NULL;
}
@@ -266,13 +266,14 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
sc->center = Inkscape::setup_for_drag_start(desktop, event_context, event);
SnapManager &m = desktop->namedview->snap_manager;
- m.setup(desktop, sc->item);
- sc->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, sc->center).getPoint();
+ m.setup(desktop, NULL); //null, because we don't have an item yet
+ m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, sc->center);
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
( GDK_KEY_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK |
+ GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK ),
NULL, event->button.time);
ret = TRUE;
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop, sc->item);
- motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt).getPoint();
+ m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt);
sp_spiral_drag(sc, motion_dt, event->motion.state);
gobble_motion_events(GDK_BUTTON1_MASK);
NR::Point p1 = sp_desktop_dt2root_xy_point(desktop, p);
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop, sc->item);
- p1 = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p1).getPoint();
+ m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, p1);
SPSpiral *spiral = SP_SPIRAL(sc->item);