From: johanengelen Date: Sun, 29 Jun 2008 13:15:53 +0000 (+0000) Subject: replace some spcurve->last_bpath calls with spcurve->is_empty X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2a34e39eb7f3bab6e265292463d348be75abc5d1;p=inkscape.git replace some spcurve->last_bpath calls with spcurve->is_empty --- diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 78baacc76..9509efc69 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -871,8 +871,7 @@ pen_lastpoint_move (SPPenContext *const pc, gdouble x, gdouble y) return; // green - NArtBpath const * bpath = pc->green_curve->last_bpath(); - if (bpath) { + if (!pc->green_curve->is_empty()) { pc->green_curve->last_point_additive_move( Geom::Point(x,y) ); } else { // start anchor too diff --git a/src/verbs.cpp b/src/verbs.cpp index 494181e55..8c5ce310b 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1606,7 +1606,7 @@ ZoomVerb::perform(SPAction *action, void *data, void */*pdata*/) // While drawing with the pen/pencil tool, zoom towards the end of the unfinished path if (tools_isactive(dt, TOOLS_FREEHAND_PENCIL) || tools_isactive(dt, TOOLS_FREEHAND_PEN)) { SPCurve *rc = SP_DRAW_CONTEXT(ec)->red_curve; - if (rc->last_bpath()) { + if (!rc->is_empty()) { NR::Point const zoom_to (rc->last_point()); dt->zoom_relative_keep_point(zoom_to, mul*zoom_inc); break; @@ -1624,7 +1624,7 @@ ZoomVerb::perform(SPAction *action, void *data, void */*pdata*/) // While drawing with the pen/pencil tool, zoom away from the end of the unfinished path if (tools_isactive(dt, TOOLS_FREEHAND_PENCIL) || tools_isactive(dt, TOOLS_FREEHAND_PEN)) { SPCurve *rc = SP_DRAW_CONTEXT(ec)->red_curve; - if (rc->last_bpath()) { + if (!rc->is_empty()) { NR::Point const zoom_to (rc->last_point()); dt->zoom_relative_keep_point(zoom_to, 1 / (mul*zoom_inc)); break;