summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-05-05 06:57:22 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-05-05 06:57:22 +0000
commitffaf932dc2a22ebc5fb470e124a44441c89efc9d (patch)
tree3c6b14280397ee1c6c6a4a62ac64f0a0c0d5e113 /src
parentfix 1480934 (diff)
downloadinkscape-ffaf932dc2a22ebc5fb470e124a44441c89efc9d.tar.gz
inkscape-ffaf932dc2a22ebc5fb470e124a44441c89efc9d.zip
fix 1214286, 1482209
(bzr r731)
Diffstat (limited to 'src')
-rw-r--r--src/pen-context.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index 03a993f82..b6fdafc55 100644
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
@@ -923,13 +923,7 @@ pen_handle_key_press(SPPenContext *const pc, GdkEvent *event)
case GDK_Delete:
case GDK_KP_Delete:
if (sp_curve_is_empty(pc->green_curve)) {
- /* Same as cancel */
- pc->state = SP_PEN_CONTEXT_STOP;
- spdc_reset_colors(pc);
- sp_canvas_item_hide(pc->c0);
- sp_canvas_item_hide(pc->c1);
- sp_canvas_item_hide(pc->cl0);
- sp_canvas_item_hide(pc->cl1);
+ pen_cancel (pc);
ret = TRUE;
} else {
/* Reset red curve */
@@ -948,7 +942,11 @@ pen_handle_key_press(SPPenContext *const pc, GdkEvent *event)
break;
}
pc->p[0] = p[e - 2].c(3);
- pc->p[1] = p[e - 1].c(1);
+ if (p[e - 1].code == NR_CURVETO) {
+ pc->p[1] = p[e - 1].c(1);
+ } else {
+ pc->p[1] = pc->p[0];
+ }
NR::Point const pt(( pc->npoints < 4
? p[e - 1].c(3)
: pc->p[3] ));