From a5479f49002017808116f8f6b7813d8bd89cf24a Mon Sep 17 00:00:00 2001 From: akl Date: Fri, 22 Nov 2013 08:13:36 +0000 Subject: [PATCH] Fix JoinAll operation --- src/HYDROCurveCreator/CurveCreator_Curve.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/HYDROCurveCreator/CurveCreator_Curve.cxx b/src/HYDROCurveCreator/CurveCreator_Curve.cxx index 77323148..824338b2 100644 --- a/src/HYDROCurveCreator/CurveCreator_Curve.cxx +++ b/src/HYDROCurveCreator/CurveCreator_Curve.cxx @@ -525,12 +525,15 @@ bool CurveCreator_Curve::join( const int theISectionTo, const int theISectionFrom ) { bool res = false; - if (theISectionTo != theISectionFrom) { + if (mySections.size() >= 2 && + ( theISectionTo != theISectionFrom || (theISectionTo == -1 && theISectionFrom == -1) )) { startOperation(); + int aISectionTo = getNbSections()-1; + int aISectionFrom = 0; if (addEmptyDiff()) - myListDiffs.back().init(this, CurveCreator_Operation::Join, theISectionTo, theISectionFrom); + myListDiffs.back().init(this, CurveCreator_Operation::Join, aISectionTo, aISectionFrom); - res = joinInternal( theISectionTo, theISectionFrom ); + res = joinInternal( aISectionTo, aISectionFrom ); finishOperation(); } -- 2.39.2