From 876c0372b872e9ae70dac896f4d9b0d3dce32398 Mon Sep 17 00:00:00 2001 From: cilix42 Date: Sun, 9 Mar 2008 22:28:58 +0000 Subject: [PATCH] Don't steal 'del' key in pen context when there is no curve being drawn (closes LP #200241) --- src/pen-context.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 53b4dd652..b9a084ec1 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -999,8 +999,12 @@ pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) case GDK_Delete: case GDK_KP_Delete: if (sp_curve_is_empty(pc->green_curve)) { - pen_cancel (pc); - ret = TRUE; + if (!sp_curve_is_empty(pc->red_curve)) { + pen_cancel (pc); + ret = TRUE; + } else { + // do nothing; this event should be handled upstream + } } else { /* Reset red curve */ sp_curve_reset(pc->red_curve); -- 2.30.2