From aebbf53233f5a23dad2ebdd69154897f8562c26f Mon Sep 17 00:00:00 2001 From: cilix42 Date: Wed, 6 Aug 2008 13:22:19 +0000 Subject: [PATCH] Esc and Ctrl+Z in pencil tool should also cancel when we're drawing straight line (in which case pc->is_drawing will be false) --- src/pencil-context.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 894b5cd71..f52094ed1 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -503,21 +503,16 @@ pencil_handle_key_press(SPPencilContext *const pc, guint const keyval, guint con break; case GDK_Escape: if (pc->npoints != 0) { - // if drawing, cancel, otherwise pass it up for deselecting - if (pc->is_drawing) { - pencil_cancel (pc); - ret = TRUE; - } + 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 - if (pc->is_drawing) { - pencil_cancel (pc); - ret = TRUE; - } + pencil_cancel (pc); + ret = TRUE; } break; case GDK_g: -- 2.30.2