Code

Make linked offsets respect "Relink duplicated clones" settings
[inkscape.git] / src / star-context.cpp
index 63a15545f78b1deb9263edc4aa0301427dde9a43..910c048b6f67e26ab58b4a9377d09ca8f6ff0120 100644 (file)
@@ -111,6 +111,7 @@ sp_star_context_init (SPStarContext * star_context)
     event_context->tolerance = 0;
     event_context->within_tolerance = false;
     event_context->item_to_select = NULL;
+    event_context->tool_url = "/tools/shapes/star";
 
     star_context->item = NULL;
 
@@ -260,7 +261,7 @@ static gint sp_star_context_root_handler(SPEventContext *event_context, GdkEvent
             SnapManager &m = desktop->namedview->snap_manager;
             m.setup(desktop, true);
             m.freeSnapReturnByRef(sc->center, Inkscape::SNAPSOURCE_NODE_HANDLE);
-
+            m.unSetup();
             sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
                                 GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
                                 GDK_POINTER_MOTION_MASK |
@@ -297,7 +298,9 @@ static gint sp_star_context_root_handler(SPEventContext *event_context, GdkEvent
 
             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));
+            m.unSetup();
         }
         break;
     case GDK_BUTTON_RELEASE:
@@ -443,7 +446,7 @@ static void sp_star_drag(SPStarContext *sc, Geom::Point p, guint state)
     m.setup(desktop, true, sc->item);
     Geom::Point pt2g = to_2geom(p);
     m.freeSnapReturnByRef(pt2g, Inkscape::SNAPSOURCE_NODE_HANDLE);
-
+    m.unSetup();
     Geom::Point const p0 = desktop->dt2doc(sc->center);
     Geom::Point const p1 = desktop->dt2doc(pt2g);
 
@@ -537,4 +540,4 @@ static void sp_star_cancel(SPStarContext *sc)
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :