summaryrefslogtreecommitdiffstats
path: root/src/arc-context.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-05-18 20:01:38 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-05-18 20:01:38 +0000
commitbc3837b9d1e51bee748f79275c21de1ac86d482e (patch)
tree19afa256880aaadf8dd86547a2c7ed83b4e6f7e9 /src/arc-context.cpp
parentConvenience access functions for first and last value of a Geom::Piecewise<> (diff)
downloadinkscape-bc3837b9d1e51bee748f79275c21de1ac86d482e.tar.gz
inkscape-bc3837b9d1e51bee748f79275c21de1ac86d482e.zip
Eliminate some redundant snapping calls
(bzr r5693)
Diffstat (limited to 'src/arc-context.cpp')
-rw-r--r--src/arc-context.cpp13
1 files changed, 5 insertions, 8 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;