diff options
| author | Ted Gould <ted@gould.cx> | 2009-11-29 19:01:07 +0000 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2009-11-29 19:01:07 +0000 |
| commit | 29d3c0b15028e61f176df3a75189bf0959d0d03e (patch) | |
| tree | 727afe596c693a9bdd098d72618abd9ceb0d1969 /src/display/curve.cpp | |
| parent | Add the build dir dbus directory to grab some headerfiles for distcheck. (diff) | |
| parent | hopefully fix build on linux (diff) | |
| download | inkscape-29d3c0b15028e61f176df3a75189bf0959d0d03e.tar.gz inkscape-29d3c0b15028e61f176df3a75189bf0959d0d03e.zip | |
Merging in from trunk
(bzr r8254.1.37)
Diffstat (limited to 'src/display/curve.cpp')
| -rw-r--r-- | src/display/curve.cpp | 8 |
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--; } } } |
