Skip to content

Commit

Permalink
Merge pull request #1959 from ModOrganizer2/category_alternate_source
Browse files Browse the repository at this point in the history
Use primary game source for categories if defined
  • Loading branch information
Silarn authored Dec 28, 2023
2 parents b3d2747 + b350afe commit 45c017d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2842,8 +2842,14 @@ void MainWindow::refreshNexusCategories(CategoriesDialog* dialog)
{
NexusInterface& nexus = NexusInterface::instance();
nexus.setPluginContainer(&m_PluginContainer);
nexus.requestGameInfo(Settings::instance().game().plugin()->gameShortName(), dialog,
QVariant(), QString());
if (!Settings::instance().game().plugin()->primarySources().isEmpty()) {
nexus.requestGameInfo(
Settings::instance().game().plugin()->primarySources().first(), dialog,
QVariant(), QString());
} else {
nexus.requestGameInfo(Settings::instance().game().plugin()->gameShortName(), dialog,
QVariant(), QString());
}
}

void MainWindow::categoriesSaved()
Expand Down

0 comments on commit 45c017d

Please sign in to comment.