From 5b4f8c7000189059d1c32f1982e24ca998d994fe Mon Sep 17 00:00:00 2001 From: adv Date: Mon, 11 Nov 2013 10:02:58 +0000 Subject: [PATCH] Update flag for calculation case during polyline changing. --- src/HYDROData/HYDROData_CalculationCase.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 ) -- 2.39.2