From: adv Date: Fri, 13 Dec 2013 12:41:30 +0000 (+0000) Subject: Removing of profiles from stream corrected (Bug #235). X-Git-Tag: BR_hydro_v_0_5~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=005747e12db3c40808cd3780b2a9292f3f9b9cfb;p=modules%2Fhydro.git Removing of profiles from stream corrected (Bug #235). --- diff --git a/src/HYDROData/HYDROData_Stream.cxx b/src/HYDROData/HYDROData_Stream.cxx index 22a913c9..b0a2bbdd 100644 --- a/src/HYDROData/HYDROData_Stream.cxx +++ b/src/HYDROData/HYDROData_Stream.cxx @@ -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 )