diff options
| author | Tom Tanner <thosrtanner2@users.sourceforge.net> | 2015-08-13 21:48:33 +0100 |
|---|---|---|
| committer | Tom Tanner <thosrtanner2@users.sourceforge.net> | 2015-08-13 21:48:33 +0100 |
| commit | 716dbcc97d306115df4bcd32cef717e616190ce4 (patch) | |
| tree | 72ee314c91077c6843087f531cb646c122ef99e6 /src/mainwindow.cpp | |
| parent | 69a8a40b9993b791d99097549b13dee2fad0f222 (diff) | |
| parent | 8e7ac4e064c51cf8bdba7b036a027bdec1f8468f (diff) | |
Merge
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c726991c..28596127 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);
}
@@ -3561,13 +3562,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;
|
