]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Update flag for calculation case during polyline changing.
authoradv <adv@opencascade.com>
Mon, 11 Nov 2013 10:02:58 +0000 (10:02 +0000)
committeradv <adv@opencascade.com>
Mon, 11 Nov 2013 10:02:58 +0000 (10:02 +0000)
src/HYDROData/HYDROData_CalculationCase.cxx

index 16f25745525c773a714e01df16afa2bc2794b6e7..7bfffe60bded1f0e97b42701513eaadf6925e29a 100644 (file)
@@ -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 )