summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorTom Tanner <thosrtanner2@users.sourceforge.net>2015-08-13 20:07:21 +0100
committerTom Tanner <thosrtanner2@users.sourceforge.net>2015-08-13 20:07:21 +0100
commit8e7ac4e064c51cf8bdba7b036a027bdec1f8468f (patch)
tree69a166505c7c89d9b57adefc41840ccf8afbaf40 /src/mainwindow.cpp
parent9c3b390f081aff3a9777d4bb002e5c5b3bc2473e (diff)
Fix the executable configuration flags going awry from Customise window
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 422207bb..5eaa5755 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1755,7 +1755,8 @@ void MainWindow::on_executablesListBox_currentIndexChanged(int index)
if (executablesList->isEnabled()) {
//I think the 2nd test is impossible
- if ((index == 0) || (index > static_cast<int>(m_OrganizerCore.executablesList()->size()))) {
+ if (index == 0 ||
+ index > static_cast<int>(m_OrganizerCore.executablesList()->size())) {
if (modifyExecutablesDialog()) {
setExecutableIndex(previousIndex);
}
@@ -3556,13 +3557,14 @@ void MainWindow::addAsExecutable()
tr("Please enter a name for the executable"), QLineEdit::Normal,
targetInfo.baseName());
if (!name.isEmpty()) {
- m_OrganizerCore.executablesList()->addExecutable(name,
- binaryInfo.absoluteFilePath(),
- arguments,
- targetInfo.absolutePath(),
- ExecutableInfo::CloseMOStyle::DEFAULT_STAY,
- QString(),
- Executable::CustomExecutable);
+ //Note: If this already exists, you'll lose custom settings
+ m_OrganizerCore.executablesList()->configureExecutable(name,
+ binaryInfo.absoluteFilePath(),
+ arguments,
+ targetInfo.absolutePath(),
+ ExecutableInfo::CloseMOStyle::DEFAULT_STAY,
+ QString(),
+ Executable::CustomExecutable);
refreshExecutablesList();
}
} break;