From 821f95b8ab259f89f379c10e533c42476c56d361 Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Thu, 13 Aug 2015 22:37:33 +0100 Subject: Clean up of fixes for custom executable window --- src/mainwindow.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 28596127..a0a56406 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1755,8 +1755,7 @@ 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); } @@ -3563,13 +3562,13 @@ void MainWindow::addAsExecutable() targetInfo.baseName()); if (!name.isEmpty()) { //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); + m_OrganizerCore.executablesList()->addExecutable(name, + binaryInfo.absoluteFilePath(), + arguments, + targetInfo.absolutePath(), + ExecutableInfo::CloseMOStyle::DEFAULT_STAY, + QString(), + Executable::CustomExecutable); refreshExecutablesList(); } } break; -- cgit v1.3.1