summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c7433e6)
raw | patch | inline | side by side (parent: c7433e6)
author | cilix42 <cilix42@users.sourceforge.net> | |
Fri, 15 Aug 2008 06:49:36 +0000 (06:49 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Fri, 15 Aug 2008 06:49:36 +0000 (06:49 +0000) |
src/pencil-context.cpp | patch | blob | history |
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index 01f3020fda34954c0552346fae86c16088308e32..69afdf614189fc320255d4803400f63210c83cac 100644 (file)
--- a/src/pencil-context.cpp
+++ b/src/pencil-context.cpp
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: