From: mzn Date: Fri, 20 Dec 2013 10:27:46 +0000 (+0000) Subject: Bug #226: children are not shown under Polyline 3D, Channel and Digue. X-Git-Tag: BR_hydro_v_0_6~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=13143d8bcbd34f8e2e30361581720f8fa21674d9;p=modules%2Fhydro.git Bug #226: children are not shown under Polyline 3D, Channel and Digue. Fixed for channel, digue and steram objects. --- diff --git a/src/HYDROGUI/HYDROGUI_DataModel.cxx b/src/HYDROGUI/HYDROGUI_DataModel.cxx index 81a96bfd..e1a64a83 100644 --- a/src/HYDROGUI/HYDROGUI_DataModel.cxx +++ b/src/HYDROGUI/HYDROGUI_DataModel.cxx @@ -877,11 +877,34 @@ void HYDROGUI_DataModel::buildObjectTree( SUIT_DataObject* theParent, Handle(HYDROData_Channel) aChannelObj = Handle(HYDROData_Channel)::DownCast( aDataObj ); - Handle(HYDROData_Profile) aProfile = aChannelObj->GetProfile(); + LightApp_DataObject* aGuideLineSect = + createObject( aGuiObj, tr( "CHANNEL_GUIDE_LINE" ), aGuiObj->entry() ); Handle(HYDROData_Polyline3D) aGuideLine = aChannelObj->GetGuideLine(); + if ( !aGuideLine.IsNull() && !aGuideLine->IsRemoved() ) { + createObject( aGuideLineSect, aGuideLine, aGuiObj->entry(), false ); + } + + LightApp_DataObject* aProfileSect = + createObject( aGuiObj, tr( "CHANNEL_PROFILE" ), aGuiObj->entry() ); + Handle(HYDROData_Profile) aProfile = aChannelObj->GetProfile(); + if ( !aProfile.IsNull() && !aProfile->IsRemoved() ) { + createObject( aProfileSect, aProfile, aGuiObj->entry(), false ); + } + } + else if ( anObjectKind == KIND_STREAM ) + { + Handle(HYDROData_Stream) aStreamObj = + Handle(HYDROData_Stream)::DownCast( aDataObj ); + + LightApp_DataObject* aHydraulicAxisSect = + createObject( aGuiObj, tr( "STREAM_HYDRAULIC_AXIS" ), aGuiObj->entry() ); + Handle(HYDROData_PolylineXY) aHydraulicAxis = aStreamObj->GetHydraulicAxis(); + if ( !aHydraulicAxis.IsNull() && !aHydraulicAxis->IsRemoved() ) { + createObject( aHydraulicAxisSect, aHydraulicAxis, aGuiObj->entry(), false ); + } - createObject( aGuiObj, aProfile, aGuiObj->entry(), false ); - createObject( aGuiObj, aGuideLine, aGuiObj->entry(), false ); + HYDROData_SequenceOfObjects aProfiles = aStreamObj->GetProfiles(); + buildObjectPartition( aGuiObj, aProfiles, tr( "STREAM_PROFILES" ), true ); } } diff --git a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts index a0dc42c7..27de521e 100644 --- a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts +++ b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts @@ -197,6 +197,22 @@ All supported formats (*.brep *.iges *.igs *.step *.stp) POLYLINE3D_BATHYMETRY Bathymetry + + CHANNEL_GUIDE_LINE + Guide line + + + CHANNEL_PROFILE + Profile + + + STREAM_HYDRAULIC_AXIS + Hydraulic axis + + + STREAM_PROFILES + Profiles +