diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2016-10-08 16:05:13 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2016-10-08 16:05:13 +0000 |
| commit | 6092d5422b03608db00f18e6ad8c87465b5dc3e8 (patch) | |
| tree | 2ae791c03acda4ca0bf1cc2fb309a94c39cbd058 /src/livarot/Path.cpp | |
| parent | [Bug #770681] KEY MAPPING: Comma and period hijacked by scaling. (diff) | |
| parent | Made the style-utils.h license dual-with-GPLv2+. (diff) | |
| download | inkscape-6092d5422b03608db00f18e6ad8c87465b5dc3e8.tar.gz inkscape-6092d5422b03608db00f18e6ad8c87465b5dc3e8.zip | |
merge trunk-refactoring
(bzr r15156)
Diffstat (limited to 'src/livarot/Path.cpp')
| -rw-r--r-- | src/livarot/Path.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/livarot/Path.cpp b/src/livarot/Path.cpp index 68891e4aa..5fa418968 100644 --- a/src/livarot/Path.cpp +++ b/src/livarot/Path.cpp @@ -380,24 +380,18 @@ void Path::InsertBezierTo(Geom::Point const &iPt, int iNb, int at) /* - * points de la polyligne + * points of the polyline */ void Path::SetBackData (bool nVal) { - if (back == false) { - if (nVal == true && back == false) { + if (! back) { + if (nVal) { back = true; ResetPoints(); - } else if (nVal == false && back == true) { - back = false; - ResetPoints(); } } else { - if (nVal == true && back == false) { - back = true; - ResetPoints(); - } else if (nVal == false && back == true) { + if (! nVal) { back = false; ResetPoints(); } @@ -417,7 +411,7 @@ int Path::AddPoint(Geom::Point const &iPt, bool mvto) return AddPoint (iPt, -1, 0.0, mvto); } - if ( !mvto && pts.empty() == false && pts.back().p == iPt ) { + if ( !mvto && !pts.empty() && pts.back().p == iPt ) { return -1; } @@ -441,11 +435,11 @@ int Path::ReplacePoint(Geom::Point const &iPt) int Path::AddPoint(Geom::Point const &iPt, int ip, double it, bool mvto) { - if (back == false) { + if (! back) { return AddPoint (iPt, mvto); } - if ( !mvto && pts.empty() == false && pts.back().p == iPt ) { + if ( !mvto && !pts.empty() && pts.back().p == iPt ) { return -1; } |
