]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Bug #226: children are not shown under Polyline 3D, Channel and Digue.
authormzn <mzn@opencascade.com>
Fri, 20 Dec 2013 10:27:46 +0000 (10:27 +0000)
committermzn <mzn@opencascade.com>
Fri, 20 Dec 2013 10:27:46 +0000 (10:27 +0000)
Fixed for channel, digue and steram objects.

src/HYDROGUI/HYDROGUI_DataModel.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index 81a96bfd4814423896f1d89fb183f6966b25ce88..e1a64a838c2d86a0e36378a236d6eeacb3b6ad47 100644 (file)
@@ -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 );
   }
 }
 
index a0dc42c789fe4fb63a8075f66ba9a70db2943c9b..27de521ea0ae28627290094e0b4dc12f8f9b615d 100644 (file)
@@ -197,6 +197,22 @@ All supported formats (*.brep *.iges *.igs *.step *.stp)</translation>
       <source>POLYLINE3D_BATHYMETRY</source>
       <translation>Bathymetry</translation>
     </message>
+    <message>
+      <source>CHANNEL_GUIDE_LINE</source>
+      <translation>Guide line</translation>
+    </message>
+    <message>
+      <source>CHANNEL_PROFILE</source>
+      <translation>Profile</translation>
+    </message>
+    <message>
+      <source>STREAM_HYDRAULIC_AXIS</source>
+      <translation>Hydraulic axis</translation>
+    </message>
+    <message>
+      <source>STREAM_PROFILES</source>
+      <translation>Profiles</translation>
+    </message>
   </context>
 
   <context>