diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2009-07-18 12:56:25 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2009-07-18 12:56:25 +0000 |
| commit | eae8322c8b968bbf076323eb68707124bfc810d9 (patch) | |
| tree | 55fcc2e3532076b16f22ac310f675c82c7a6ed9c /src/pencil-context.cpp | |
| parent | Minor French translation update. (diff) | |
| download | inkscape-eae8322c8b968bbf076323eb68707124bfc810d9.tar.gz inkscape-eae8322c8b968bbf076323eb68707124bfc810d9.zip | |
Make the snap delay mechanism easier to implement for the devs, and get rid of the related warning messages
(bzr r8302)
Diffstat (limited to 'src/pencil-context.cpp')
| -rw-r--r-- | src/pencil-context.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 4b87e86b5..31b7441d4 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -255,7 +255,6 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve /* Set first point of sequence */ SnapManager &m = desktop->namedview->snap_manager; m.setup(desktop); - sp_event_context_snap_window_open(event_context); if (anchor) { p = anchor->dp; @@ -349,7 +348,7 @@ pencil_handle_motion_notify(SPPencilContext *const pc, GdkEventMotion const &mev /* We may be idle or already freehand */ if ( mevent.state & GDK_BUTTON1_MASK && pc->is_drawing ) { if (pc->state == SP_PENCIL_CONTEXT_IDLE) { - sp_event_context_snap_window_closed(event_context); + sp_event_context_discard_delayed_snap_event(event_context); } pc->state = SP_PENCIL_CONTEXT_FREEHAND; @@ -417,7 +416,6 @@ pencil_handle_button_release(SPPencilContext *const pc, GdkEventButton const &re /* Releasing button in idle mode means single click */ /* We have already set up start point/anchor in button_press */ pc->state = SP_PENCIL_CONTEXT_ADDLINE; - //sp_event_context_snap_window_open(dt->canvas); ret = TRUE; break; case SP_PENCIL_CONTEXT_ADDLINE: @@ -431,7 +429,7 @@ pencil_handle_button_release(SPPencilContext *const pc, GdkEventButton const &re spdc_set_endpoint(pc, p); spdc_finish_endpoint(pc); pc->state = SP_PENCIL_CONTEXT_IDLE; - sp_event_context_snap_window_closed(event_context); + sp_event_context_discard_delayed_snap_event(event_context); ret = TRUE; break; case SP_PENCIL_CONTEXT_FREEHAND: @@ -445,7 +443,6 @@ pencil_handle_button_release(SPPencilContext *const pc, GdkEventButton const &re } pc->state = SP_PENCIL_CONTEXT_SKETCH; - //sp_event_context_snap_window_open(dt->canvas); } else { /* Finish segment now */ /// \todo fixme: Clean up what follows (Lauris) @@ -465,7 +462,6 @@ pencil_handle_button_release(SPPencilContext *const pc, GdkEventButton const &re pc->green_anchor = sp_draw_anchor_destroy(pc->green_anchor); } pc->state = SP_PENCIL_CONTEXT_IDLE; - // sp_event_context_snap_window_closed(dt->canvas); // reset sketch mode too pc->sketch_n = 0; } @@ -498,7 +494,7 @@ pencil_cancel (SPPencilContext *const pc) pc->is_drawing = false; pc->state = SP_PENCIL_CONTEXT_IDLE; - sp_event_context_snap_window_closed(SP_EVENT_CONTEXT(pc)); + sp_event_context_discard_delayed_snap_event(SP_EVENT_CONTEXT(pc)); pc->red_curve->reset(); sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(pc->red_bpath), NULL); @@ -589,7 +585,7 @@ pencil_handle_key_release(SPPencilContext *const pc, guint const keyval, guint c pc->green_anchor = sp_draw_anchor_destroy(pc->green_anchor); } pc->state = SP_PENCIL_CONTEXT_IDLE; - sp_event_context_snap_window_closed(SP_EVENT_CONTEXT(pc)); + sp_event_context_discard_delayed_snap_event(SP_EVENT_CONTEXT(pc)); pc->desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Finishing freehand sketch")); ret = TRUE; } |
