From: akl Date: Fri, 22 Nov 2013 08:13:36 +0000 (+0000) Subject: Fix JoinAll operation X-Git-Tag: BR_hydro_v_0_3_1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a5479f49002017808116f8f6b7813d8bd89cf24a;p=modules%2Fhydro.git Fix JoinAll operation --- 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(); }