summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a5b2598)
raw | patch | inline | side by side (parent: a5b2598)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Wed, 10 Feb 2010 15:46:07 +0000 (16:46 +0100) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Wed, 10 Feb 2010 15:46:07 +0000 (16:46 +0100) |
when closing a path.
src/display/curve.cpp | patch | blob | history |
diff --git a/src/display/curve.cpp b/src/display/curve.cpp
index 7d7dbc987664c417bb894503eccc40695d6c45a6..7c3c3d48074e6529228d66cd4badf1c5a82f5cb2 100644 (file)
--- a/src/display/curve.cpp
+++ b/src/display/curve.cpp
void
SPCurve::closepath_current()
{
- _pathv.back().setFinal(_pathv.back().initialPoint());
+ if (_pathv.back().size() > 0 && dynamic_cast<Geom::LineSegment const *>(&_pathv.back().back_open())) {
+ _pathv.back().erase_last();
+ } else {
+ _pathv.back().setFinal(_pathv.back().initialPoint());
+ }
_pathv.back().close(true);
}