summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
Diffstat (limited to 'src/display')
-rw-r--r--src/display/curve.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/display/curve.cpp b/src/display/curve.cpp
index 5a1e2abeb..7d7dbc987 100644
--- a/src/display/curve.cpp
+++ b/src/display/curve.cpp
@@ -629,10 +629,14 @@ SPCurve::nodes_in_path() const
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--;
}
}
}