From 8e7ac4e064c51cf8bdba7b036a027bdec1f8468f Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Thu, 13 Aug 2015 20:07:21 +0100 Subject: Fix the executable configuration flags going awry from Customise window --- src/mainwindow.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/mainwindow.cpp') 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(m_OrganizerCore.executablesList()->size()))) { + if (index == 0 || + index > static_cast(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; -- cgit v1.3.1