summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 4ffa044b..466fb1c0 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -67,6 +67,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <utility.h>
#include <ipluginproxy.h>
#include <dataarchives.h>
+#include <bsainvalidation.h>
#include <questionboxmemory.h>
#include <taskprogressmanager.h>
#include <util.h>
@@ -1312,15 +1313,23 @@ void MainWindow::updateBSAList(const QStringList &defaultArchives, const QString
std::vector<std::pair<UINT32, QTreeWidgetItem*>> items;
+ IPluginGame *gamePlugin = qApp->property("managed_game").value<IPluginGame*>();
+
+ BSAInvalidation *invalidation = gamePlugin->feature<BSAInvalidation>();
+
for (FileEntry::Ptr current : m_OrganizerCore.directoryStructure()->getFiles()) {
QFileInfo fileInfo(ToQString(current->getName().c_str()));
if (fileInfo.suffix().toLower() == "bsa") {
- int index = activeArchives.indexOf(fileInfo.fileName());
+ int index = activeArchives.indexOf(fileInfo.fileName()) + 2;
if (index == -1) {
index = 0xFFFF;
}
+ if ((invalidation != nullptr) && invalidation->isInvalidationBSA(fileInfo.fileName())) {
+ index = 1;
+ }
+
QString basename = fileInfo.baseName();
int originId = current->getOrigin();
FilesOrigin &origin = m_OrganizerCore.directoryStructure()->getOriginByID(originId);