Code

update 2geom
[inkscape.git] / src / spiral-context.cpp
index 57c06e4a315730da08c08880ec9e2dc87a1a62af..56c5b0ebd76bf89d1407b1e18b7d4a26ece8a483 100644 (file)
@@ -131,7 +131,7 @@ sp_spiral_context_dispose(GObject *object)
     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,8 +266,8 @@ 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);
-                m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, sc->center);
+                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 |
@@ -296,7 +296,7 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event)
                 
                 SnapManager &m = desktop->namedview->snap_manager;
                 m.setup(desktop, sc->item);
-                m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt);
+                m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt);
                 sp_spiral_drag(sc, motion_dt, event->motion.state);
 
                 gobble_motion_events(GDK_BUTTON1_MASK);
@@ -440,7 +440,7 @@ sp_spiral_drag(SPSpiralContext *sc, NR::Point p, guint state)
     NR::Point p1 = sp_desktop_dt2root_xy_point(desktop, p);
     SnapManager &m = desktop->namedview->snap_manager;
     m.setup(desktop, sc->item);
-    m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, p1);
+    m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, p1);
 
     SPSpiral *spiral = SP_SPIRAL(sc->item);