Merge pull request #9541 from Ondsel-Development/wb_prevent_duplicates
Pref: Wb: prevent duplicate workbenches in the lists.
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user