Code

Esc and Ctrl+Z in pencil tool should also cancel when we're drawing straight line...
authorcilix42 <cilix42@users.sourceforge.net>
Wed, 6 Aug 2008 13:22:19 +0000 (13:22 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Wed, 6 Aug 2008 13:22:19 +0000 (13:22 +0000)
src/pencil-context.cpp

index 894b5cd71878f986f131359ed36c02f76e571540..f52094ed101bf5dd8f3eb1ad60dfd74b02d26d57 100644 (file)
@@ -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: