From: adv Date: Mon, 11 Nov 2013 10:02:58 +0000 (+0000) Subject: Update flag for calculation case during polyline changing. X-Git-Tag: BR_hydro_v_0_3~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5b4f8c7000189059d1c32f1982e24ca998d994fe;p=modules%2Fhydro.git Update flag for calculation case during polyline changing. --- diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index 16f25745..7bfffe60 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -172,7 +172,12 @@ void HYDROData_CalculationCase::RemoveGeometryObjects() void HYDROData_CalculationCase::SetBoundaryPolyline( const Handle(HYDROData_Polyline)& thePolyline ) { + Handle(HYDROData_Polyline) aPrevPolyline = GetBoundaryPolyline(); + SetReferenceObject( thePolyline, DataTag_Polyline ); + + // Indicate model of the need to update zones splitting + SetToUpdate( !IsEqual( aPrevPolyline, thePolyline ) || IsMustBeUpdated() ); } Handle(HYDROData_Polyline) HYDROData_CalculationCase::GetBoundaryPolyline() const @@ -183,7 +188,12 @@ Handle(HYDROData_Polyline) HYDROData_CalculationCase::GetBoundaryPolyline() cons void HYDROData_CalculationCase::RemoveBoundaryPolyline() { + Handle(HYDROData_Polyline) aPrevPolyline = GetBoundaryPolyline(); + ClearReferenceObjects( DataTag_Polyline ); + + // Indicate model of the need to update zones splitting + SetToUpdate( !aPrevPolyline.IsNull() || IsMustBeUpdated() ); } Handle(HYDROData_Region) HYDROData_CalculationCase::AddNewRegion( const Handle(HYDROData_Zone)& theZone )