From: johanengelen Date: Wed, 23 Jul 2008 17:49:49 +0000 (+0000) Subject: 2geom path to livarot path conversion: don't add closing line segment when it is... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f62b878457b8d12424cb339d419d50f3c4e4d275;p=inkscape.git 2geom path to livarot path conversion: don't add closing line segment when it is degenerate. --- 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(); } }