From 2f228961a2c6c194051d5c839fc678258a457494 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 4 Apr 2014 12:38:25 +0400 Subject: [PATCH] Test Object browser --- src/XGUI/XGUI_DocumentDataModel.cpp | 3 +-- src/XGUI/XGUI_Workshop.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/XGUI/XGUI_DocumentDataModel.cpp b/src/XGUI/XGUI_DocumentDataModel.cpp index f65545188..ccb90aae2 100644 --- a/src/XGUI/XGUI_DocumentDataModel.cpp +++ b/src/XGUI/XGUI_DocumentDataModel.cpp @@ -55,6 +55,7 @@ QVariant XGUI_DocumentDataModel::headerData(int section, Qt::Orientation orienta int XGUI_DocumentDataModel::rowCount(const QModelIndex &parent) const { std::shared_ptr 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 diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 1403e3b00..7f936b82c 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -8,6 +8,9 @@ #include "XGUI_Workshop.h" #include "XGUI_Viewer.h" +#include +#include + #include #include @@ -53,6 +56,9 @@ void XGUI_Workshop::startApplication() QMdiSubWindow* aWnd = myMainWindow->viewer()->createView(); aWnd->showMaximized(); myMainWindow->showPythonConsole(); + + std::shared_ptr aMgr = ModelAPI_PluginManager::get(); + std::shared_ptr myRoot = aMgr->createFeature("Point"); } //****************************************************** -- 2.39.2