From: nds Date: Wed, 25 Dec 2013 14:48:29 +0000 (+0000) Subject: Refs #283 - Calculation case doesn't contain referenced objects in Object browser X-Git-Tag: BR_hydro_v_0_7~58 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f784969cce5a9b82172db2e6dce51e741430dbb0;p=modules%2Fhydro.git Refs #283 - Calculation case doesn't contain referenced objects in Object browser --- diff --git a/src/HYDROGUI/HYDROGUI_DataModel.cxx b/src/HYDROGUI/HYDROGUI_DataModel.cxx index 8163ecf5..9f6a00d1 100644 --- a/src/HYDROGUI/HYDROGUI_DataModel.cxx +++ b/src/HYDROGUI/HYDROGUI_DataModel.cxx @@ -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() ); diff --git a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts index 36645c56..215eb775 100644 --- a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts +++ b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts @@ -93,7 +93,7 @@ CASE_REGIONS - Regions + REGIONS CASE_SPLITTED_GROUPS