From 5d06850152ac3fd5776ddaded91ec2703ebeedf9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Krzysztof=20Kosi=C5=84ski?= Date: Wed, 10 Feb 2010 16:46:07 +0100 Subject: [PATCH] Prevent the Bezier tool from introducing a redundant closing line segment when closing a path. --- src/display/curve.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/display/curve.cpp b/src/display/curve.cpp index 7d7dbc987..7c3c3d480 100644 --- a/src/display/curve.cpp +++ b/src/display/curve.cpp @@ -285,7 +285,11 @@ SPCurve::closepath() void SPCurve::closepath_current() { - _pathv.back().setFinal(_pathv.back().initialPoint()); + if (_pathv.back().size() > 0 && dynamic_cast(&_pathv.back().back_open())) { + _pathv.back().erase_last(); + } else { + _pathv.back().setFinal(_pathv.back().initialPoint()); + } _pathv.back().close(true); } -- 2.30.2