1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

Merge branch 'content-lists-could-provide-duplicate-fallback-archives' into 'master'

Gracefully handle content lists that specify duplicate BSAs

Closes #8200

See merge request OpenMW/openmw!4421
This commit is contained in:
psi29a 2024-10-25 11:08:41 +00:00
commit a11e683a40

View File

@ -399,6 +399,9 @@ void Launcher::DataFilesPage::populateFileViews(const QString& contentModelName)
continue;
const auto name = match[0]->text();
const auto oldrow = ui.archiveListWidget->row(match[0]);
// entries may be duplicated, e.g. if a content list predated a BSA being added to a non-user config file
if (oldrow < row)
continue;
ui.archiveListWidget->takeItem(oldrow);
ui.archiveListWidget->insertItem(row, name);
ui.archiveListWidget->item(row)->setCheckState(Qt::Checked);