]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Test Object browser
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 4 Apr 2014 08:38:25 +0000 (12:38 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 4 Apr 2014 08:38:25 +0000 (12:38 +0400)
src/XGUI/XGUI_DocumentDataModel.cpp
src/XGUI/XGUI_Workshop.cpp

index f65545188e1b334444ac1282ba7e4dc67ce72f99..ccb90aae2a3e3afe9393656009888dc288ce2169 100644 (file)
@@ -55,6 +55,7 @@ QVariant XGUI_DocumentDataModel::headerData(int section, Qt::Orientation orienta
 int XGUI_DocumentDataModel::rowCount(const QModelIndex &parent) const
 {
   std::shared_ptr<ModelAPI_Iterator> aIt = myDocument->featuresIterator(PARTS_GROUP);
+  int a = aIt->numIterationsLeft();
   return aIt->numIterationsLeft() + 2;
 }
 
@@ -96,7 +97,5 @@ bool XGUI_DocumentDataModel::hasChildren(const QModelIndex& theParent) const
     return myDocument->featuresIterator(PARAMETERS_GROUP)->more();
   if (theParent.internalId() == quintptr(&myConstructFolder))
     return myDocument->featuresIterator(CONSTRUCTIONS_GROUP)->more();
-  if (theParent.internalId() == 0)
-    return false;
   return false;
 }
\ No newline at end of file
index 1403e3b00edbfdcf751807881300f7e809666a8c..7f936b82cb6f21823d1b49af73216b4f2e94a00e 100644 (file)
@@ -8,6 +8,9 @@
 #include "XGUI_Workshop.h"
 #include "XGUI_Viewer.h"
 
+#include <ModelAPI_PluginManager.h>
+#include <ModelAPI_Feature.h>
+
 #include <Config_FeatureMessage.h>
 #include <Event_Loop.h>
 
@@ -53,6 +56,9 @@ void XGUI_Workshop::startApplication()
   QMdiSubWindow* aWnd = myMainWindow->viewer()->createView();
   aWnd->showMaximized();
   myMainWindow->showPythonConsole();
+
+  std::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
+  std::shared_ptr<ModelAPI_Feature> myRoot = aMgr->createFeature("Point");
 }
 
 //******************************************************