From 4ca5f2f0676050e339d2b7f8c12c57c79aeec28a Mon Sep 17 00:00:00 2001 From: Paddle Date: Wed, 10 May 2023 10:47:13 +0200 Subject: [PATCH] Pref: Wb: remove the need to restart on wb activation and order change. --- src/Gui/DlgSettingsWorkbenchesImp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Gui/DlgSettingsWorkbenchesImp.cpp b/src/Gui/DlgSettingsWorkbenchesImp.cpp index 84269b6a18..aea9e7b60c 100644 --- a/src/Gui/DlgSettingsWorkbenchesImp.cpp +++ b/src/Gui/DlgSettingsWorkbenchesImp.cpp @@ -293,6 +293,9 @@ void DlgSettingsWorkbenchesImp::saveSettings() hGrp->SetASCII("Ordered", orderedStr.str().c_str()); hGrp->SetASCII("Disabled", disabledStr.str().c_str()); + //Update the list of workbenches in the WorkbenchGroup and in the WorkbenchComboBox & workbench QMenu + Application::Instance->signalRefreshWorkbenches(); + App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")-> SetASCII("BackgroundAutoloadModules", autoloadStr.str().c_str()); @@ -477,8 +480,6 @@ void DlgSettingsWorkbenchesImp::loadWorkbenchSelector() void DlgSettingsWorkbenchesImp::wbToggled(const QString& wbName, bool enabled) { - requireRestart(); - setStartWorkbenchComboItems(); //reorder the list of items. @@ -551,7 +552,6 @@ void DlgSettingsWorkbenchesImp::setStartWorkbenchComboItems() void DlgSettingsWorkbenchesImp::wbItemMoved() { - requireRestart(); for (int i = 0; i < ui->wbList->count(); i++) { wbListItem* wbItem = dynamic_cast(ui->wbList->itemWidget(ui->wbList->item(i))); if (wbItem) {