]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Removing of profiles from stream corrected (Bug #235).
authoradv <adv@opencascade.com>
Fri, 13 Dec 2013 12:41:30 +0000 (12:41 +0000)
committeradv <adv@opencascade.com>
Fri, 13 Dec 2013 12:41:30 +0000 (12:41 +0000)
src/HYDROData/HYDROData_Stream.cxx

index 22a913c9469d43f1f7469525e2afebf65f15907a..b0a2bbdd50b4c6177b8866b64c8b09fe36e358f6 100644 (file)
@@ -770,6 +770,12 @@ void HYDROData_Stream::removeParameter( const int& theIndex )
   if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), aParamsArray ) )
     return;
 
+  if ( aParamsArray->Length() == 1 )
+  {
+    removeParametersArray();
+    return;
+  }
+
   TColStd_Array1OfReal aNewArr( aParamsArray->Lower(), aParamsArray->Upper() - 1 );
 
   for ( int i = aParamsArray->Lower(), j = i, k = 0, n = aParamsArray->Upper(); i <= n; ++i, ++k )