diff options
| author | Silarn <jrim@rimpo.org> | 2018-04-27 20:00:51 -0500 |
|---|---|---|
| committer | Silarn <jrim@rimpo.org> | 2018-04-27 20:00:51 -0500 |
| commit | 41a479bddfbcd21640c0871423b819b154956cfa (patch) | |
| tree | a69ffbc781181c850e04f18543597bb5e0a7547b /src/modinfodialog.cpp | |
| parent | e02614ee1455f0ae9fb9ec9df3b928381ae98079 (diff) | |
Cache the current game as populating the dropdown triggers the save
Diffstat (limited to 'src/modinfodialog.cpp')
| -rw-r--r-- | src/modinfodialog.cpp | 3 |
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());
|
