From 1fb2a2033a18dc3520a36432bcc009ec0171df47 Mon Sep 17 00:00:00 2001 From: dvlierop2 Date: Wed, 30 May 2007 20:27:45 +0000 Subject: [PATCH] Don't return too much snappoints --- src/sp-shape.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index a0c26e8f5..6dba2afb6 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -1021,6 +1021,11 @@ static void sp_shape_snappoints(SPItem const *item, SnapPointsIter p) /* Use the end points of each segment of the path */ NArtBpath const *bp = SP_CURVE_BPATH(shape->curve); + + if (bp->code == NR_MOVETO) { // Indicates the start of a closed subpath, see nr-path-code.h + bp++; //The first point of a closed path is coincident with the end point. Skip the first point as we need only one + } + while (bp->code != NR_END) { *p = bp->c(3) * i2d; bp++; -- 2.30.2