Pref: wb: change to disabled + ordered lists.

This commit is contained in:
Paddle
2023-03-31 14:12:01 +02:00
parent 0d61b99a36
commit dbd65e2b37
3 changed files with 65 additions and 66 deletions

View File

@@ -800,19 +800,8 @@ void WorkbenchGroup::setWorkbenchData(int index, const QString& wb)
void WorkbenchGroup::refreshWorkbenchList()
{
QStringList items = Application::Instance->workbenches();
QStringList enabled_wbs_list = DlgSettingsWorkbenchesImp::getEnabledWorkbenches();
// Go through the list of enabled workbenches and verify that they really exist because
// it might be possible that a workbench has been removed after setting up the list of
// enabled workbenches.
for (int i = 0; i < enabled_wbs_list.size(); i++) {
if (items.indexOf(enabled_wbs_list[i]) < 0) {
enabled_wbs_list.removeAt(i);
i--;
}
}
// Resize the action group.
QList<QAction*> workbenches = groupAction()->actions();
int numActions = workbenches.size();