]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Refs #283 - Calculation case doesn't contain referenced objects in Object browser
authornds <nds@opencascade.com>
Wed, 25 Dec 2013 14:48:29 +0000 (14:48 +0000)
committernds <nds@opencascade.com>
Wed, 25 Dec 2013 14:48:29 +0000 (14:48 +0000)
src/HYDROGUI/HYDROGUI_DataModel.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index 8163ecf5b9782e929097bf27850471ecd8e397ec..9f6a00d182a3ad3551a7e723ebaa9ac80b67f66a 100644 (file)
@@ -827,6 +827,33 @@ void HYDROGUI_DataModel::buildObjectTree( SUIT_DataObject* theParent,
     Handle(HYDROData_CalculationCase) aCaseObj =
       Handle(HYDROData_CalculationCase)::DownCast( aDataObj );
 
+    LightApp_DataObject* aCaseAOSect = 
+      createObject( aGuiObj, tr( partitionName( KIND_ARTIFICIAL_OBJECT ).toAscii() ),
+                    aGuiObj->entry() );
+    LightApp_DataObject* aCaseNOSect = 
+      createObject( aGuiObj, tr( partitionName( KIND_NATURAL_OBJECT ).toAscii() ),
+                    aGuiObj->entry() );
+
+    HYDROData_SequenceOfObjects aSeq = aCaseObj->GetGeometryObjects();
+    HYDROData_SequenceOfObjects::Iterator aGOIter( aSeq );
+    Handle(HYDROData_Entity) anEntity;
+    Handle(HYDROData_ArtificialObject) anAObject;
+    Handle(HYDROData_NaturalObject) aNObject;
+    for ( ; aGOIter.More(); aGOIter.Next() )
+    {
+      anEntity = aGOIter.Value();
+      if ( anEntity.IsNull() )
+        continue;
+      anAObject = Handle(HYDROData_ArtificialObject)::DownCast( anEntity );
+      if ( !anAObject.IsNull() )
+        createObject( aCaseAOSect, anAObject, aGuiObj->entry(), false );
+      else
+      {
+        aNObject = Handle(HYDROData_NaturalObject)::DownCast( anEntity );
+        if ( !aNObject.IsNull() )
+          createObject( aCaseNOSect, aNObject, aGuiObj->entry(), false );
+      }
+    }
     LightApp_DataObject* aCaseRegionsSect = 
       createObject( aGuiObj, tr( "CASE_REGIONS" ), aGuiObj->entry() );
 
index 36645c566b33117cfc5cf324da03d5a2611c842f..215eb77583b6dc598b7f996a667e0d5233a55385 100644 (file)
@@ -93,7 +93,7 @@
     </message>
     <message>
       <source>CASE_REGIONS</source>
-      <translation>Regions</translation>
+      <translation>REGIONS</translation>
     </message>
     <message>
       <source>CASE_SPLITTED_GROUPS</source>