From 57fd35fc479af1d3e6a30094e8d2f8b082cc46f3 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sun, 17 Feb 2019 23:16:49 -0600 Subject: Visit Nexus page for first primary source if game does not have its own Nexus page --- src/mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cpp') 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))); } -- cgit v1.3.1