Pref: Wb: prevent duplicate workbenches in the lists.

This commit is contained in:
Paddle
2023-05-11 10:25:29 +02:00
parent 478b5e0628
commit 710cb5d81f

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++) {