summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ff31b39)
raw | patch | inline | side by side (parent: ff31b39)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 28 Sep 2009 22:15:36 +0000 (22:15 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 28 Sep 2009 22:15:36 +0000 (22:15 +0000) |
src/display/curve.cpp | patch | blob | history |
diff --git a/src/display/curve.cpp b/src/display/curve.cpp
index 5a1e2abebcd7f2975f1581895a67391c636cb596..7d7dbc987664c417bb894503eccc40695d6c45a6 100644 (file)
--- a/src/display/curve.cpp
+++ b/src/display/curve.cpp
nr++; // count last node (this works also for closed paths because although they don't have a 'last node', they do have an extra segment
- if (it->closed()) {
+ // do not count closing knot double for zero-length closing line segments
+ // however, if the path is only a moveto, and is closed, do not subtract 1 (otherwise the result will be zero nodes)
+ if ( it->closed()
+ && ((*it).size() != 0) )
+ {
Geom::Curve const &c = it->back_closed();
if (are_near(c.initialPoint(), c.finalPoint())) {
- nr--; // do not count closing knot double for zero-length closing line segments
+ nr--;
}
}
}