summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-02-17 23:16:49 -0600
committerLostDragonist <lost.dragonist@gmail.com>2019-02-17 23:16:49 -0600
commit57fd35fc479af1d3e6a30094e8d2f8b082cc46f3 (patch)
tree3c8b6c2e7d5d16b6556142c9361209b86559ef74
parentee266e52209fc9fce32031fd5ae0c9703b64cada (diff)
Visit Nexus page for first primary source if game does not have its own Nexus page
-rw-r--r--src/mainwindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index bb5cd337..a30fdaac 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -4871,7 +4871,11 @@ void MainWindow::on_actionSettings_triggered()
void MainWindow::on_actionNexus_triggered()
{
- QDesktopServices::openUrl(QUrl(NexusInterface::instance(&m_PluginContainer)->getGameURL(m_OrganizerCore.managedGame()->gameShortName())));
+ const IPluginGame *game = m_OrganizerCore.managedGame();
+ QString gameName = game->gameShortName();
+ if (game->gameNexusName().isEmpty() && game->primarySources().count())
+ gameName = game->primarySources()[0];
+ QDesktopServices::openUrl(QUrl(NexusInterface::instance(&m_PluginContainer)->getGameURL(gameName)));
}