diff options
| author | John Bintz <me@johnbintz.com> | 2006-09-03 20:52:14 +0000 |
|---|---|---|
| committer | johncoswell <johncoswell@users.sourceforge.net> | 2006-09-03 20:52:14 +0000 |
| commit | 881acd281d9f600655fcc7d8b8aa10e2e5ee940d (patch) | |
| tree | af590a498faef6f8e7ede84b1d594553a1477023 /src/pen-context.cpp | |
| parent | rename, move to render submenu, make it always start with lorem ipsum (diff) | |
| download | inkscape-881acd281d9f600655fcc7d8b8aa10e2e5ee940d.tar.gz inkscape-881acd281d9f600655fcc7d8b8aa10e2e5ee940d.zip | |
Disable pen events while finishing pen operations to prevent race condition
(bzr r1670)
Diffstat (limited to 'src/pen-context.cpp')
| -rw-r--r-- | src/pen-context.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 1136efb34..c050c888b 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -925,9 +925,7 @@ pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) case GDK_Return: case GDK_KP_Enter: if (pc->npoints != 0) { - pen_disable_events(pc); spdc_pen_finish(pc, FALSE); - pen_enable_events(pc); ret = TRUE; } break; @@ -1149,6 +1147,8 @@ spdc_pen_finish_segment(SPPenContext *const pc, NR::Point const p, guint const s static void spdc_pen_finish(SPPenContext *const pc, gboolean const closed) { + pen_disable_events(pc); + SPDesktop *const desktop = pc->desktop; pc->_message_context->clear(); desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Drawing finished")); @@ -1169,6 +1169,8 @@ spdc_pen_finish(SPPenContext *const pc, gboolean const closed) if (pc->green_anchor) { pc->green_anchor = sp_draw_anchor_destroy(pc->green_anchor); } + + pen_enable_events(pc); } static void |
