summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSilarn <jrim@rimpo.org>2018-04-27 20:00:51 -0500
committerSilarn <jrim@rimpo.org>2018-04-27 20:00:51 -0500
commit41a479bddfbcd21640c0871423b819b154956cfa (patch)
treea69ffbc781181c850e04f18543597bb5e0a7547b /src
parente02614ee1455f0ae9fb9ec9df3b928381ae98079 (diff)
Cache the current game as populating the dropdown triggers the save
Diffstat (limited to 'src')
-rw-r--r--src/modinfodialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp
index a137873e..12654755 100644
--- a/src/modinfodialog.cpp
+++ b/src/modinfodialog.cpp
@@ -96,6 +96,7 @@ ModInfoDialog::ModInfoDialog(ModInfo::Ptr modInfo, const DirectoryEntry *directo
connect(ui->modIDEdit, SIGNAL(linkClicked(QString)), this, SLOT(linkClicked(QString)));
+ QString gameName = modInfo->getGameName();
ui->sourceGameEdit->addItem(organizerCore->managedGame()->gameName(), organizerCore->managedGame()->gameShortName());
if (organizerCore->managedGame()->validShortNames().size() == 0) {
ui->sourceGameEdit->setDisabled(true);
@@ -109,7 +110,7 @@ ModInfoDialog::ModInfoDialog(ModInfo::Ptr modInfo, const DirectoryEntry *directo
}
}
}
- ui->sourceGameEdit->setCurrentIndex(ui->sourceGameEdit->findData(m_ModInfo->getGameName()));
+ ui->sourceGameEdit->setCurrentIndex(ui->sourceGameEdit->findData(gameName));
ui->notesEdit->setText(modInfo->notes());