Skip to content

Commit

Permalink
by default disable old tree view & property view
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 9, 2018
1 parent 847c6ef commit 3d8b815
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions src/Gui/MainWindow.cpp
Expand Up @@ -333,20 +333,34 @@ MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f)

// Tree view
if (hiddenDockWindows.find("Std_TreeView") == std::string::npos) {
TreeDockWidget* tree = new TreeDockWidget(0, this);
tree->setObjectName
(QString::fromLatin1(QT_TRANSLATE_NOOP("QDockWidget","Tree view")));
tree->setMinimumWidth(210);
pDockMgr->registerDockWindow("Std_TreeView", tree);
//work through parameter.
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("DockWindows")->GetGroup("TreeView");
bool enabled = group->GetBool("Enabled", false);
group->SetBool("Enabled", enabled); //ensure entry exists.
if (enabled) {
TreeDockWidget* tree = new TreeDockWidget(0, this);
tree->setObjectName
(QString::fromLatin1(QT_TRANSLATE_NOOP("QDockWidget","Tree view")));
tree->setMinimumWidth(210);
pDockMgr->registerDockWindow("Std_TreeView", tree);
}
}

// Property view
if (hiddenDockWindows.find("Std_PropertyView") == std::string::npos) {
PropertyDockView* pcPropView = new PropertyDockView(0, this);
pcPropView->setObjectName
(QString::fromLatin1(QT_TRANSLATE_NOOP("QDockWidget","Property view")));
pcPropView->setMinimumWidth(210);
pDockMgr->registerDockWindow("Std_PropertyView", pcPropView);
//work through parameter.
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("DockWindows")->GetGroup("PropertyView");
bool enabled = group->GetBool("Enabled", false);
group->SetBool("Enabled", enabled); //ensure entry exists.
if (enabled) {
PropertyDockView* pcPropView = new PropertyDockView(0, this);
pcPropView->setObjectName
(QString::fromLatin1(QT_TRANSLATE_NOOP("QDockWidget","Property view")));
pcPropView->setMinimumWidth(210);
pDockMgr->registerDockWindow("Std_PropertyView", pcPropView);
}
}

// Selection view
Expand Down

0 comments on commit 3d8b815

Please sign in to comment.