Skip to content

Commit

Permalink
Merge branch 'content-lists-could-provide-duplicate-fallback-archives…
Browse files Browse the repository at this point in the history
…' into 'master'

Gracefully handle content lists that specify duplicate BSAs

Closes #8200

See merge request OpenMW/openmw!4421
  • Loading branch information
psi29a committed Oct 25, 2024
2 parents e9627e9 + 0537b53 commit a11e683
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/launcher/datafilespage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a11e683

Please sign in to comment.