From: Krzysztof KosiƄski Date: Wed, 10 Feb 2010 15:46:07 +0000 (+0100) Subject: Prevent the Bezier tool from introducing a redundant closing line segment X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5d06850152ac3fd5776ddaded91ec2703ebeedf9;p=inkscape.git Prevent the Bezier tool from introducing a redundant closing line segment when closing a path. --- 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); }