summaryrefslogtreecommitdiffstats
path: root/src/livarot/Path.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-10-08 18:30:03 +0000
committerjabiertxof <info@marker.es>2016-10-08 18:30:03 +0000
commit0d65a6366721c314ca82e2600b7a2778e42bfdca (patch)
treed432377950a04fddd169c0b5bb8517345f9cee3e /src/livarot/Path.cpp
parentKeep selection (diff)
parentmerge trunk-refactoring (diff)
downloadinkscape-0d65a6366721c314ca82e2600b7a2778e42bfdca.tar.gz
inkscape-0d65a6366721c314ca82e2600b7a2778e42bfdca.zip
Update to trunk
(bzr r15142.1.6)
Diffstat (limited to 'src/livarot/Path.cpp')
-rw-r--r--src/livarot/Path.cpp20
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;
}