summaryrefslogtreecommitdiffstats
path: root/src/pencil-context.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-08-06 13:22:19 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-08-06 13:22:19 +0000
commit0bf980a42a2072a7f5acacf87224cfed98f775fb (patch)
tree4ace2c65a7a847656a8bdbbf2350e99af91a8979 /src/pencil-context.cpp
parentadd flashing line from clone to original on Shift+D (diff)
downloadinkscape-0bf980a42a2072a7f5acacf87224cfed98f775fb.tar.gz
inkscape-0bf980a42a2072a7f5acacf87224cfed98f775fb.zip
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)
(bzr r6574)
Diffstat (limited to 'src/pencil-context.cpp')
-rw-r--r--src/pencil-context.cpp13
1 files 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: