]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Code for debug group objects added (Feature #242).
authoradv <adv@opencascade.com>
Tue, 17 Dec 2013 07:02:35 +0000 (07:02 +0000)
committeradv <adv@opencascade.com>
Tue, 17 Dec 2013 07:02:35 +0000 (07:02 +0000)
src/HYDROGUI/HYDROGUI_DataModel.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index e43410b4be30caec6ab3904c337c8d1b7401d45d..084fab39315e0a7b4468ff2b3ef3768ab9a512ab 100644 (file)
 #include <QApplication>
 #include <QDir>
 
+// #define DEB_GROUPS 1
+#ifdef DEB_GROUPS
+#include <HYDROData_EdgesGroup.h>
+#endif
+
 static HYDROData_SequenceOfObjects myCopyingObjects;
 
 HYDROGUI_DataModel::HYDROGUI_DataModel( CAM_Module* theModule )
@@ -721,6 +726,21 @@ void HYDROGUI_DataModel::buildObjectTree( SUIT_DataObject* theParent,
     Handle(HYDROData_DummyObject3D) anObject3D = aGeomObj->GetObject3D();
     if ( !anObject3D.IsNull() )
       createObject( aGuiObj, anObject3D, aGuiObj->entry(), false );
+
+#ifdef DEB_GROUPS
+    LightApp_DataObject* aGroupsSect = 
+      createObject( aGuiObj, tr( "OBJECT_GROUPS" ), aGuiObj->entry() );
+
+    HYDROData_SequenceOfObjects anObjGroups = aGeomObj->GetGroups();
+    HYDROData_SequenceOfObjects::Iterator anIter( anObjGroups );
+    for ( ; anIter.More(); anIter.Next() )
+    {
+      Handle(HYDROData_EdgesGroup) anObjGroup =
+        Handle(HYDROData_EdgesGroup)::DownCast( anIter.Value() );
+      if( !anObjGroup.IsNull() && !anObjGroup->IsRemoved() )
+        createObject( aGroupsSect, anObjGroup, aGuiObj->entry(), false );
+    }
+#endif
   }
 
   ObjectKind anObjectKind = aDataObj->GetKind();
index 08ae62f6adb97a33fa7ba125363e32873d168989..b609374077345d1d3a74c673ca12182f8df5b058 100644 (file)
@@ -148,6 +148,10 @@ does not exist or you have not enough permissions to open it.</translation>
       <source>ZONE_BATHYMETRY</source>
       <translation>Bathymetry</translation>
     </message>
+    <message>
+      <source>OBJECT_GROUPS</source>
+      <translation>Groups</translation>
+    </message>
     <message>
       <source>MERGE_UNKNOWN</source>
       <translation>Unresolved Conflict</translation>