summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arc-context.cpp13
-rw-r--r--src/rect-context.cpp7
2 files changed, 6 insertions, 14 deletions
diff --git a/src/arc-context.cpp b/src/arc-context.cpp
index b06b5fb86..45b67a7dc 100644
--- a/src/arc-context.cpp
+++ b/src/arc-context.cpp
@@ -263,10 +263,6 @@ static gint sp_arc_context_root_handler(SPEventContext *event_context, GdkEvent
dragging = true;
ac->center = Inkscape::setup_for_drag_start(desktop, event_context, event);
- SnapManager &m = desktop->namedview->snap_manager;
- m.setup(desktop, ac->item);
- m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, ac->center);
-
sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK,
@@ -290,10 +286,6 @@ static gint sp_arc_context_root_handler(SPEventContext *event_context, GdkEvent
NR::Point const motion_w(event->motion.x, event->motion.y);
NR::Point motion_dt(desktop->w2d(motion_w));
- SnapManager &m = desktop->namedview->snap_manager;
- m.setup(desktop, ac->item);
- m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt);
-
sp_arc_drag(ac, motion_dt, event->motion.state);
gobble_motion_events(GDK_BUTTON1_MASK);
@@ -433,6 +425,11 @@ static void sp_arc_drag(SPArcContext *ac, NR::Point pt, guint state)
ac->item->updateRepr();
sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
+
+ /* Snap center */
+ SnapManager &m = desktop->namedview->snap_manager;
+ m.setup(desktop, ac->item);
+ m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, ac->center);
}
bool ctrl_save = false;
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index 3ecd89113..d1e5fe381 100644
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
@@ -328,14 +328,9 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent
// motion notify coordinates as given (no snapping back to origin)
event_context->within_tolerance = false;
- NR::Point const motion_w(event->motion.x,
- event->motion.y);
+ NR::Point const motion_w(event->motion.x, event->motion.y);
NR::Point motion_dt(desktop->w2d(motion_w));
- //SnapManager &m = desktop->namedview->snap_manager;
- //m.setup(desktop, rc->item);
- //m.freeSnapReturnByRef(Inkscape::Snapper::SNAPPOINT_NODE, motion_dt);
-
sp_rect_drag(*rc, motion_dt, event->motion.state); // this will also handle the snapping
gobble_motion_events(GDK_BUTTON1_MASK);
ret = TRUE;