diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-07-23 17:49:49 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-07-23 17:49:49 +0000 |
| commit | b2960015b9f92978917388af6c5dd1137b73b40a (patch) | |
| tree | 10804843995050648de0cc6e745c15c27cad7abd /src/livarot/PathCutting.cpp | |
| parent | added forgotten ":" :-) (diff) | |
| download | inkscape-b2960015b9f92978917388af6c5dd1137b73b40a.tar.gz inkscape-b2960015b9f92978917388af6c5dd1137b73b40a.zip | |
2geom path to livarot path conversion: don't add closing line segment when it is degenerate.
(bzr r6404)
Diffstat (limited to 'src/livarot/PathCutting.cpp')
| -rw-r--r-- | src/livarot/PathCutting.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/livarot/PathCutting.cpp b/src/livarot/PathCutting.cpp index 7146d91f9..0ad6171c1 100644 --- a/src/livarot/PathCutting.cpp +++ b/src/livarot/PathCutting.cpp @@ -428,11 +428,17 @@ void Path::LoadPath(Geom::Path const &path, Geom::Matrix const &tr, bool doTran MoveTo( from_2geom(pathtr.initialPoint()) ); - for(Geom::Path::const_iterator cit = pathtr.begin(); cit != pathtr.end_default(); ++cit) { + for(Geom::Path::const_iterator cit = pathtr.begin(); cit != pathtr.end_open(); ++cit) { AddCurve(*cit); } if (pathtr.closed()) { + // check if closing segment is empty before adding it + Geom::Curve const &crv = pathtr.back_closed(); + if ( !crv.isDegenerate() ) { + AddCurve(crv); + } + Close(); } } |
