From 93b32b3658d65c44d984f69ef1a175e73eea5d20 Mon Sep 17 00:00:00 2001 From: AL <26797547+Al12rs@users.noreply.github.com> Date: Tue, 25 Aug 2020 20:46:23 +0200 Subject: Add the installed file to the list even from InstallMod, not just InstallDownload. InstallMod is used for Reinstalling. --- src/organizercore.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/organizercore.cpp') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 1e2a0aa1..2d469a6b 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -739,6 +739,12 @@ MOBase::IModInterface *OrganizerCore::installMod(const QString &fileName, int modIndex = ModInfo::getIndex(modName); if (modIndex != UINT_MAX) { ModInfo::Ptr modInfo = ModInfo::getByIndex(modIndex); + auto dlIdx = m_DownloadManager.indexByName(QFileInfo(fileName).fileName()); + if (dlIdx != -1) { + int modId = m_DownloadManager.getModID(dlIdx); + int fileId = m_DownloadManager.getFileInfo(dlIdx)->fileID; + modInfo->addInstalledFile(modId, fileId); + } if (hasIniTweaks && (m_UserInterface != nullptr) && (QMessageBox::question(qApp->activeWindow(), tr("Configure Mod"), tr("This mod contains ini tweaks. Do you " -- cgit v1.3.1