Gui: simplify code to handle workbench selector

+ replace three boolean parameters with a single string parameter
+ refactor DlgGeneralImp::saveSettings/loadSettings
+ handle visibility of corner widgets
This commit is contained in:
wmayer
2022-11-08 14:05:54 +01:00
committed by Uwe
parent 2e1feaa78e
commit e6a8533fa8
5 changed files with 70 additions and 52 deletions

View File

@@ -752,7 +752,8 @@ ToolBarItem* StdWorkbench::setupToolBars() const
// Workbench switcher
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/MainWindow");
if (hGrp->GetBool("WSToolbar", true)) {
std::string defaultPos = "WSToolbar";
if (hGrp->GetASCII("WSPosition", defaultPos.c_str()) == defaultPos) {
auto wb = new ToolBarItem(root);
wb->setCommand("Workbench");
*wb << "Std_Workbench";