From e180a73c03c71c51b676cc345e92d9ff0e3115e4 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 29 Mar 2009 19:12:03 +0000 Subject: - Move snap delay mechanism to the event context (used to be in SPCanvas) - Rename lots of variables and methods to make them easier to understand - Add snapping to the connector tool (bzr r7589) --- src/box3d-context.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/box3d-context.cpp') diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp index e8cee44b0..5fb85d793 100644 --- a/src/box3d-context.cpp +++ b/src/box3d-context.cpp @@ -276,7 +276,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven event_context->item_to_select = sp_event_context_find_item (desktop, button_w, event->button.state & GDK_MOD1_MASK, event->button.state & GDK_CONTROL_MASK); dragging = true; - sp_canvas_set_snap_delay_active(desktop->canvas, true); + sp_event_context_snap_window_open(event_context); /* */ Geom::Point button_dt(desktop->w2d(button_w)); @@ -373,7 +373,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven event_context->xp = event_context->yp = 0; if ( event->button.button == 1 && !event_context->space_panning) { dragging = false; - sp_canvas_set_snap_delay_active(desktop->canvas, false); + sp_event_context_snap_window_closed(event_context); if (!event_context->within_tolerance) { // we've been dragging, finish the box @@ -506,7 +506,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time); dragging = false; - sp_canvas_set_snap_delay_active(desktop->canvas, false); + sp_event_context_snap_window_closed(event_context); if (!event_context->within_tolerance) { // we've been dragging, finish the box sp_box3d_finish(bc); -- cgit v1.2.3