diff options
| author | Al <26797547+Al12rs@users.noreply.github.com> | 2020-08-26 11:23:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-26 11:23:42 -0700 |
| commit | f0e94c26aebae6f86a59ed974e433f96e77faec7 (patch) | |
| tree | edad726b43475bd51840799e9b6c68509a7f8473 | |
| parent | abc714c624712682b6f2b5c174d7cbd76ef8b51e (diff) | |
| parent | 93b32b3658d65c44d984f69ef1a175e73eea5d20 (diff) | |
Merge pull request #1212 from Al12rs/mod_reinstall_modinfo_fix
Fix missing installed file info after reinstalling a mod.
| -rw-r--r-- | src/organizercore.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index d144c185..28bb06db 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -741,6 +741,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 " |
