@@ -333,20 +333,34 @@ MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f)
333
333
334
334
// Tree view
335
335
if (hiddenDockWindows.find (" Std_TreeView" ) == std::string::npos) {
336
- TreeDockWidget* tree = new TreeDockWidget (0 , this );
337
- tree->setObjectName
338
- (QString::fromLatin1 (QT_TRANSLATE_NOOP (" QDockWidget" ," Tree view" )));
339
- tree->setMinimumWidth (210 );
340
- pDockMgr->registerDockWindow (" Std_TreeView" , tree);
336
+ // work through parameter.
337
+ ParameterGrp::handle group = App::GetApplication ().GetUserParameter ().
338
+ GetGroup (" BaseApp" )->GetGroup (" Preferences" )->GetGroup (" DockWindows" )->GetGroup (" TreeView" );
339
+ bool enabled = group->GetBool (" Enabled" , false );
340
+ group->SetBool (" Enabled" , enabled); // ensure entry exists.
341
+ if (enabled) {
342
+ TreeDockWidget* tree = new TreeDockWidget (0 , this );
343
+ tree->setObjectName
344
+ (QString::fromLatin1 (QT_TRANSLATE_NOOP (" QDockWidget" ," Tree view" )));
345
+ tree->setMinimumWidth (210 );
346
+ pDockMgr->registerDockWindow (" Std_TreeView" , tree);
347
+ }
341
348
}
342
349
343
350
// Property view
344
351
if (hiddenDockWindows.find (" Std_PropertyView" ) == std::string::npos) {
345
- PropertyDockView* pcPropView = new PropertyDockView (0 , this );
346
- pcPropView->setObjectName
347
- (QString::fromLatin1 (QT_TRANSLATE_NOOP (" QDockWidget" ," Property view" )));
348
- pcPropView->setMinimumWidth (210 );
349
- pDockMgr->registerDockWindow (" Std_PropertyView" , pcPropView);
352
+ // work through parameter.
353
+ ParameterGrp::handle group = App::GetApplication ().GetUserParameter ().
354
+ GetGroup (" BaseApp" )->GetGroup (" Preferences" )->GetGroup (" DockWindows" )->GetGroup (" PropertyView" );
355
+ bool enabled = group->GetBool (" Enabled" , false );
356
+ group->SetBool (" Enabled" , enabled); // ensure entry exists.
357
+ if (enabled) {
358
+ PropertyDockView* pcPropView = new PropertyDockView (0 , this );
359
+ pcPropView->setObjectName
360
+ (QString::fromLatin1 (QT_TRANSLATE_NOOP (" QDockWidget" ," Property view" )));
361
+ pcPropView->setMinimumWidth (210 );
362
+ pDockMgr->registerDockWindow (" Std_PropertyView" , pcPropView);
363
+ }
350
364
}
351
365
352
366
// Selection view
0 commit comments