diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-06-08 18:33:23 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-06-08 18:33:23 +0000 |
| commit | 994c00962dd8804494792678b272c412654d58cc (patch) | |
| tree | 009359746f3e4690da789fb5f04974e1cc16e9a8 /src/draw-context.cpp | |
| parent | add method to retrieve first and last path of SPCurve, fix error. (diff) | |
| download | inkscape-994c00962dd8804494792678b272c412654d58cc.tar.gz inkscape-994c00962dd8804494792678b272c412654d58cc.zip | |
simplify code that puts anchors at start and end of paths in draw context.
(bzr r5859)
Diffstat (limited to 'src/draw-context.cpp')
| -rw-r--r-- | src/draw-context.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/draw-context.cpp b/src/draw-context.cpp index 8858a4560..4d60cda05 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -313,14 +313,11 @@ spdc_attach_selection(SPDrawContext *dc, Inkscape::Selection */*sel*/) SPCurve *c; c = (SPCurve*)l->data; g_return_if_fail( c->get_length() > 1 ); - if ( SP_CURVE_BPATH(c)->code == NR_MOVETO_OPEN ) { - NArtBpath const *s, *e; + if ( !c->is_closed() ) { SPDrawAnchor *a; - s = c->first_bpath(); - e = c->last_bpath(); - a = sp_draw_anchor_new(dc, c, TRUE, NR::Point(s->x3, s->y3)); + a = sp_draw_anchor_new(dc, c, TRUE, c->first_point()); dc->white_anchors = g_slist_prepend(dc->white_anchors, a); - a = sp_draw_anchor_new(dc, c, FALSE, NR::Point(e->x3, e->y3)); + a = sp_draw_anchor_new(dc, c, FALSE, c->last_point()); dc->white_anchors = g_slist_prepend(dc->white_anchors, a); } } |
