From f62b878457b8d12424cb339d419d50f3c4e4d275 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Wed, 23 Jul 2008 17:49:49 +0000 Subject: [PATCH] 2geom path to livarot path conversion: don't add closing line segment when it is degenerate. --- src/livarot/PathCutting.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(); } } -- 2.30.2