From 54e219759283c4805f40c03d2215831081f55d51 Mon Sep 17 00:00:00 2001 From: Silarn Date: Fri, 4 May 2018 11:35:44 -0500 Subject: Allow update processor to include the managed game if nexus info matches --- src/mainwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2aaf7f59..2830c776 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4274,13 +4274,21 @@ void MainWindow::nxmUpdatesAvailable(const std::vector &modIDs, QVariant us } } else { QString gameName = m_OrganizerCore.managedGame()->gameShortName(); + bool sameNexus = false; for (IPluginGame *game : m_PluginContainer.plugins()) { if (game->nexusGameID() == result["game_id"].toInt()) { gameName = game->gameShortName(); + if (game->nexusGameID() == m_OrganizerCore.managedGame()->nexusGameID()) + sameNexus = true; break; } } std::vector info = ModInfo::getByModID(gameName, result["id"].toInt()); + if (sameNexus) { + std::vector mainInfo = ModInfo::getByModID(m_OrganizerCore.managedGame()->gameShortName(), result["id"].toInt()); + info.reserve(info.size() + mainInfo.size()); + info.insert(info.end(), mainInfo.begin(), mainInfo.end()); + } for (auto iter = info.begin(); iter != info.end(); ++iter) { (*iter)->setNewestVersion(result["version"].toString()); (*iter)->setNexusDescription(result["description"].toString()); -- cgit v1.3.1