diff options
| author | Ted Gould <ted@gould.cx> | 2008-10-31 15:06:16 +0000 |
|---|---|---|
| committer | Ted Gould <ted@canonical.com> | 2008-10-31 15:06:16 +0000 |
| commit | 7e67d66e7817a9321c4e94b2184a9226b20b396a (patch) | |
| tree | a857d7aae5f544c4243a331e4eb4e4629bbc27a9 /src/pen-context.cpp | |
| parent | Merge from trunk (diff) | |
| download | inkscape-7e67d66e7817a9321c4e94b2184a9226b20b396a.tar.gz inkscape-7e67d66e7817a9321c4e94b2184a9226b20b396a.zip | |
Merge from trunk
(bzr r6887)
Diffstat (limited to 'src/pen-context.cpp')
| -rw-r--r-- | src/pen-context.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pen-context.cpp b/src/pen-context.cpp index eb399d191..4f4d287ad 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -1110,7 +1110,7 @@ pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) case GDK_BackSpace: case GDK_Delete: case GDK_KP_Delete: - if (pc->green_curve->is_empty()) { + if ( pc->green_curve->is_empty() || (pc->green_curve->last_segment() == NULL) ) { if (!pc->red_curve->is_empty()) { pen_cancel (pc); ret = TRUE; @@ -1132,8 +1132,7 @@ pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) break; } // The code below assumes that pc->green_curve has only ONE path ! - Geom::Path const & path = pc->green_curve->get_pathvector().back(); - Geom::Curve const * crv = &path.back_default(); + Geom::Curve const * crv = pc->green_curve->last_segment(); pc->p[0] = crv->initialPoint(); if ( Geom::CubicBezier const * cubic = dynamic_cast<Geom::CubicBezier const *>(crv)) { pc->p[1] = (*cubic)[1]; |
