From 41616965270180f42ae4c835042fc6159bf68841 Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 27 Mar 2015 16:33:32 +0100 Subject: bugfix: MO didn't use all parameters of preconfigured executables --- src/editexecutablesdialog.cpp | 4 ++-- src/executableslist.cpp | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index 974020d0..e84e1112 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -287,8 +287,8 @@ void EditExecutablesDialog::on_executablesListBox_clicked(const QModelIndex &cur ui->closeCheckBox->setToolTip(tr("If checked, MO will be closed once the specified executable is run.")); } ui->removeButton->setEnabled(selectedExecutable.m_Custom); - ui->overwriteAppIDBox->setChecked(selectedExecutable.m_SteamAppID != 0); - if (selectedExecutable.m_SteamAppID != 0) { + ui->overwriteAppIDBox->setChecked(!selectedExecutable.m_SteamAppID.isEmpty()); + if (!selectedExecutable.m_SteamAppID.isEmpty()) { ui->appIDOverwriteEdit->setText(selectedExecutable.m_SteamAppID); } else { ui->appIDOverwriteEdit->clear(); diff --git a/src/executableslist.cpp b/src/executableslist.cpp index 35bb30ae..9f0cd315 100644 --- a/src/executableslist.cpp +++ b/src/executableslist.cpp @@ -182,13 +182,16 @@ void ExecutablesList::addExecutable(const QString &title, const QString &executa if (existingExe != m_Executables.end()) { existingExe->m_Title = title; - existingExe->m_CloseMO = closeMO; - existingExe->m_BinaryInfo = file; - existingExe->m_Arguments = arguments; - existingExe->m_WorkingDirectory = workingDirectory; - existingExe->m_SteamAppID = steamAppID; existingExe->m_Custom = custom; + existingExe->m_CloseMO = closeMO; existingExe->m_Toolbar = toolbar; + if (custom) { + // for pre-configured executables don't overwrite settings we didn't store + existingExe->m_BinaryInfo = file; + existingExe->m_Arguments = arguments; + existingExe->m_WorkingDirectory = workingDirectory; + existingExe->m_SteamAppID = steamAppID; + } if (pos >= 0) { Executable temp = *existingExe; m_Executables.erase(existingExe); -- cgit v1.3.1