summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/downloadmanager.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index fa2c959c..34eebf0c 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -951,13 +951,20 @@ void DownloadManager::queryInfo(int index)
SelectionDialog selection(tr("Please select the source game code for %1").arg(getFileName(index)));
std::vector<std::pair<QString, QString>> choices = m_NexusInterface->getGameChoices(m_ManagedGame);
- for (auto choice : choices) {
- selection.addChoice(choice.first, choice.second, choice.first);
+ if (choices.size() == 1)
+ {
+ info->m_FileInfo->gameName = choices[0].first;
}
- if (selection.exec() == QDialog::Accepted) {
- info->m_FileInfo->gameName = selection.getChoiceData().toString();
- } else {
- info->m_FileInfo->gameName = m_ManagedGame->gameShortName();
+ else {
+ for (auto choice : choices) {
+ selection.addChoice(choice.first, choice.second, choice.first);
+ }
+ if (selection.exec() == QDialog::Accepted) {
+ info->m_FileInfo->gameName = selection.getChoiceData().toString();
+ }
+ else {
+ info->m_FileInfo->gameName = m_ManagedGame->gameShortName();
+ }
}
}
info->m_ReQueried = true;