diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-08-15 06:49:36 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-08-15 06:49:36 +0000 |
| commit | b113c3dd120bd08e49c81352b60e77a275190ffe (patch) | |
| tree | a399656d409c6f52e060cfdfa6a648689d518d4b /src/pencil-context.cpp | |
| parent | family name field on svgfonts dialog now properly saves attribute. Should do ... (diff) | |
| download | inkscape-b113c3dd120bd08e49c81352b60e77a275190ffe.tar.gz inkscape-b113c3dd120bd08e49c81352b60e77a275190ffe.zip | |
Correct fix for Esc and Shift+Z in pencil tool
(bzr r6632)
Diffstat (limited to 'src/pencil-context.cpp')
| -rw-r--r-- | src/pencil-context.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 01f3020fd..69afdf614 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -488,7 +488,6 @@ pencil_cancel (SPPencilContext *const pc) sp_canvas_end_forced_full_redraws(pc->desktop->canvas); } - static gint pencil_handle_key_press(SPPencilContext *const pc, guint const keyval, guint const state) { @@ -505,16 +504,21 @@ pencil_handle_key_press(SPPencilContext *const pc, guint const keyval, guint con break; case GDK_Escape: if (pc->npoints != 0) { - pencil_cancel (pc); - ret = TRUE; + // if drawing, cancel, otherwise pass it up for deselecting + if (pc->state != SP_PENCIL_CONTEXT_IDLE) { + pencil_cancel (pc); + ret = TRUE; + } } break; case GDK_z: case GDK_Z: if (mod_ctrl_only(state) && pc->npoints != 0) { // if drawing, cancel, otherwise pass it up for undo - pencil_cancel (pc); - ret = TRUE; + if (pc->state != SP_PENCIL_CONTEXT_IDLE) { + pencil_cancel (pc); + ret = TRUE; + } } break; case GDK_g: |
