Salome HOME
Merge branch 'BR_LAND_COVER_MAP' of ssh://git.salome-platform.org/modules/hydro into...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_CalculationOp.cxx
index 29150b4f3130c49f90181f3d703b4cb38597561f..97c826ada354267084d96e259e7a1075079b24fa 100644 (file)
@@ -632,7 +632,7 @@ void HYDROGUI_CalculationOp::onRemoveObjects()
 bool HYDROGUI_CalculationOp::confirmRegionsChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with zones
@@ -657,7 +657,7 @@ bool HYDROGUI_CalculationOp::confirmRegionsChange() const
 bool HYDROGUI_CalculationOp::confirmOrderChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with zones
@@ -682,7 +682,7 @@ bool HYDROGUI_CalculationOp::confirmOrderChange() const
 bool HYDROGUI_CalculationOp::confirmRuleChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with zones
@@ -707,7 +707,7 @@ bool HYDROGUI_CalculationOp::confirmRuleChange() const
 bool HYDROGUI_CalculationOp::confirmModeChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with zones
@@ -761,7 +761,7 @@ bool HYDROGUI_CalculationOp::confirmContinueWithWarning( const HYDROData_Warning
 bool HYDROGUI_CalculationOp::confirmLandCoverRegionsChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with land cover zones
@@ -786,7 +786,7 @@ bool HYDROGUI_CalculationOp::confirmLandCoverRegionsChange() const
 bool HYDROGUI_CalculationOp::confirmLandCoverModeChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with land cover zones
@@ -811,7 +811,7 @@ bool HYDROGUI_CalculationOp::confirmLandCoverModeChange() const
 bool HYDROGUI_CalculationOp::confirmLandCoverOrderChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with land cover zones
@@ -836,7 +836,7 @@ bool HYDROGUI_CalculationOp::confirmLandCoverOrderChange() const
 bool HYDROGUI_CalculationOp::confirmLandCoverRuleChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with land cover zones
@@ -987,10 +987,10 @@ void HYDROGUI_CalculationOp::onNext( const int theIndex )
       }
     }
     aPanel->setStricklerTableNames( aList, anEntryList );
-    bool anUpdateState = myEditedObject->IsMustBeUpdated();
+    //@ASL: bool anUpdateState = myEditedObject->IsMustBeUpdated();
     if ( !aList.isEmpty() )
       aPanel->setStricklerTable( aList.at( 0 ), false );
-    myEditedObject->SetToUpdate( anUpdateState );
+    //@ASL: myEditedObject->SetToUpdate( anUpdateState );
 
     // Fill in list widget with all available land covers
     aSeq = HYDROGUI_Tool::GetLandCovers( module() );
@@ -1060,7 +1060,7 @@ void HYDROGUI_CalculationOp::onNext( const int theIndex )
     if ( aMode == HYDROData_CalculationCase::AUTOMATIC )
     {
       // Set objects in the specified order
-      if( myEditedObject->IsMustBeUpdated() )
+      if( myEditedObject->IsMustBeUpdated(  HYDROData_Entity::Geom_2d ) )
       {
         myEditedObject->RemoveGeometryObjects();
         foreach ( const QString& aName, aPanel->getAllGeomObjects() )
@@ -1093,7 +1093,7 @@ void HYDROGUI_CalculationOp::onNext( const int theIndex )
     if ( aMode == HYDROData_CalculationCase::AUTOMATIC )
     {
       // Set objects in the specified order
-      if( myEditedObject->IsMustBeUpdated() )
+      if( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) )
       {
         myEditedObject->RemoveLandCovers();
         foreach ( const QString& aName, aPanel->getAllLandCovers() )
@@ -1119,7 +1119,7 @@ void HYDROGUI_CalculationOp::onNext( const int theIndex )
     }
     aPanel->setEditLandCoverZonesEnabled( aMode == HYDROData_CalculationCase::MANUAL );
          
-    if ( myEditedObject->IsMustBeUpdated() )
+    if ( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) )
     {
       myShowZones = true;
       myEditedObject->Update();
@@ -1577,7 +1577,7 @@ void HYDROGUI_CalculationOp::setAvailableGroups()
       aGroupsNames.append( aGroup->GetName() );
     }
   }
-  if( myEditedObject->IsMustBeUpdated() ) {
+  if( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) ) {
     for( int anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ ) {
       Handle(HYDROData_ShapesGroup) aGeomGroup =
         Handle(HYDROData_ShapesGroup)::DownCast( aSeq.Value( anIndex ) );
@@ -1590,7 +1590,7 @@ void HYDROGUI_CalculationOp::setAvailableGroups()
   aPanel->setAvailableGroups( aGroupsNames );
   aPanel->includeGroups( aList );
 
-  bool isUpdated = myEditedObject->IsMustBeUpdated();
+  //@ASL: bool isUpdated = myEditedObject->IsMustBeUpdated();
 }
 
 void HYDROGUI_CalculationOp::onAddGroups()
@@ -1747,7 +1747,7 @@ void HYDROGUI_CalculationOp::onOrderChanged( bool& isConfirmed )
 
   isConfirmed = confirmOrderChange();
   if( isConfirmed )
-    myEditedObject->SetToUpdate( true );
+    myEditedObject->Changed( HYDROData_Entity::Geom_2d );
 }
 
 void HYDROGUI_CalculationOp::onOrderLandCoverChanged( bool& isConfirmed )
@@ -1759,7 +1759,7 @@ void HYDROGUI_CalculationOp::onOrderLandCoverChanged( bool& isConfirmed )
 
   isConfirmed = confirmLandCoverOrderChange();
   if( isConfirmed )
-    myEditedObject->SetToUpdate( true );
+    myEditedObject->Changed( HYDROData_Entity::Geom_No );
 }
 
 void HYDROGUI_CalculationOp::onRuleChanged( bool& isConfirmed )
@@ -1771,7 +1771,7 @@ void HYDROGUI_CalculationOp::onRuleChanged( bool& isConfirmed )
 
   isConfirmed = confirmRuleChange();
   if( isConfirmed )
-    myEditedObject->SetToUpdate( true );
+    myEditedObject->Changed( HYDROData_Entity::Geom_2d );
 }
 
 void HYDROGUI_CalculationOp::onRuleLandCoverChanged( bool& isConfirmed )
@@ -1783,7 +1783,7 @@ void HYDROGUI_CalculationOp::onRuleLandCoverChanged( bool& isConfirmed )
 
   isConfirmed = confirmLandCoverRuleChange();
   if( isConfirmed )
-    myEditedObject->SetToUpdate( true );
+    myEditedObject->Changed( HYDROData_Entity::Geom_No );
 }
 
 void HYDROGUI_CalculationOp::onRegenerateColors()