From b0982148609a8a6f0d73d801ec9fcd1a22930f98 Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Wed, 5 Aug 2015 22:40:49 +0100 Subject: More work on the executables list Apart from an off by one in the popup list which had crept back in, reworked the underlying code even more, which now seems to get the list behaving in a predictable way. --- src/mainwindow.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index dda0470e..f0e576fe 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -959,7 +959,7 @@ void MainWindow::startExeAction() selectedExecutable.m_Arguments, selectedExecutable.m_WorkingDirectory.length() != 0 ? selectedExecutable.m_WorkingDirectory : selectedExecutable.m_BinaryInfo.absolutePath(), - selectedExecutable.m_CloseMO == ExecutableInfo::CloseMOStyle::DEFAULT_CLOSE, + selectedExecutable.closeOnExecution(), selectedExecutable.m_SteamAppID); } else { qCritical("not an action?"); @@ -1619,7 +1619,7 @@ void MainWindow::on_startButton_clicked() selectedExecutable.m_Arguments, selectedExecutable.m_WorkingDirectory.length() != 0 ? selectedExecutable.m_WorkingDirectory : selectedExecutable.m_BinaryInfo.absolutePath(), - selectedExecutable.m_CloseMO == ExecutableInfo::CloseMOStyle::DEFAULT_CLOSE, + selectedExecutable.closeOnExecution(), selectedExecutable.m_SteamAppID); } @@ -1731,7 +1731,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); } @@ -3545,9 +3545,8 @@ void MainWindow::addAsExecutable() binaryInfo.absoluteFilePath(), arguments, targetInfo.absolutePath(), - ExecutableInfo::CloseMOStyle::DEFAULT_STAY, QString(), - Executable::CustomExecutable); + Executable::SettableFlags()); refreshExecutablesList(); } } break; -- cgit v1.3.1