X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROCurveCreator%2FCurveCreator_Curve.cxx;h=824338b29055919aa2f048b9efc3a97e2ef0724e;hb=a5479f49002017808116f8f6b7813d8bd89cf24a;hp=7732314881c16fce744807370401d6da9500067b;hpb=0a05fe93f2714557dfa18debf6dc45f0515384d0;p=modules%2Fhydro.git 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(); }