Merge pull request #9541 from Ondsel-Development/wb_prevent_duplicates

Pref: Wb: prevent duplicate workbenches in the lists.
This commit is contained in:
Chris Hennes
2023-05-11 19:33:22 -05:00
committed by GitHub

View File

@@ -254,9 +254,12 @@ void DlgSettingsWorkbenchesImp::saveSettings()
std::ostringstream orderedStr, disabledStr, autoloadStr;
auto addStrToOss = [](std::string wbName, std::ostringstream& oss) {
if (!oss.str().empty())
oss << ",";
oss << wbName;
if (oss.str().find(wbName) == std::string::npos) {
if (!oss.str().empty()) {
oss << ",";
}
oss << wbName;
}
};
for (int i = 0; i < ui->wbList->count(); i++) {