summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 2ca5adc6..81696a4c 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1938,7 +1938,6 @@ void MainWindow::refreshBSAList()
for (int i = 0; i < m_DefaultArchives.count(); ++i) {
m_DefaultArchives[i] = m_DefaultArchives[i].trimmed();
}
-
m_ActiveArchives.clear();
QFile archiveFile(m_CurrentProfile->getArchivesFileName());
@@ -1970,6 +1969,9 @@ void MainWindow::refreshBSAList()
continue;
}
int index = m_ActiveArchives.indexOf(filename);
+ if (index == -1) {
+ index = 0xFFFF;
+ }
QStringList strings(filename);
bool isArchive = false;
int origin = current->getOrigin(isArchive);
@@ -1978,7 +1980,6 @@ void MainWindow::refreshBSAList()
newItem->setData(0, Qt::UserRole, index);
newItem->setData(1, Qt::UserRole, origin);
newItem->setFlags(newItem->flags() & ~Qt::ItemIsDropEnabled | Qt::ItemIsUserCheckable);
-// newItem->setFlags(newItem->flags() | Qt::ItemIsUserCheckable);
newItem->setCheckState(0, (index != -1) ? Qt::Checked : Qt::Unchecked);
if (m_Settings.forceEnableCoreFiles() && m_DefaultArchives.contains(filename)) {
newItem->setCheckState(0, Qt::Checked);