]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Adding reference Region/Zone corrected.
authoradv <adv@opencascade.com>
Tue, 5 Nov 2013 07:09:14 +0000 (07:09 +0000)
committeradv <adv@opencascade.com>
Tue, 5 Nov 2013 07:09:14 +0000 (07:09 +0000)
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_Region.cxx

index af132d34c4fc6c8469451f726f33791b7d8d9a69..6c5339e2eaf9f7f23ac8c5e84cdbcd8022fc1728 100644 (file)
@@ -198,8 +198,11 @@ bool HYDROData_CalculationCase::AddRegion( const Handle(HYDROData_Region)& theRe
 
     theRegion->SetLabel( aNewRegion->Label() );
   }
+  else
+  {
+    AddReferenceObject( theRegion, DataTag_Region );
+  }
 
-  AddReferenceObject( theRegion, DataTag_Region );
   return true;
 }
 
index 40d193b575b7cedd1e4050fa1d31caed30764211..45f96d92df1277f3265e9ca748ef7e42dd52b55b 100644 (file)
@@ -73,8 +73,11 @@ bool HYDROData_Region::AddZone( const Handle(HYDROData_Zone)& theZone )
 
     theZone->SetLabel( aNewZone->Label() );
   }
+  else
+  {
+    AddReferenceObject( theZone, DataTag_Zone );
+  }
 
-  AddReferenceObject( theZone, DataTag_Zone );
   return true;
 }