From 13143d8bcbd34f8e2e30361581720f8fa21674d9 Mon Sep 17 00:00:00 2001 From: mzn Date: Fri, 20 Dec 2013 10:27:46 +0000 Subject: [PATCH] Bug #226: children are not shown under Polyline 3D, Channel and Digue. Fixed for channel, digue and steram objects. --- src/HYDROGUI/HYDROGUI_DataModel.cxx | 29 ++++++++++++++++++++--- src/HYDROGUI/resources/HYDROGUI_msg_en.ts | 16 +++++++++++++ 2 files changed, 42 insertions(+), 3 deletions(-) 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 + -- 2.39.2