From 87fbc8a8b4e2ffdb068cfd7dcfb19089ae78c433 Mon Sep 17 00:00:00 2001 From: lordmulder Date: Wed, 26 Feb 2014 00:54:33 +0100 Subject: [PATCH] Show confirmation dialog before aborting a job. --- src/win_main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/win_main.cpp b/src/win_main.cpp index 23f1b00..81559ae 100644 --- a/src/win_main.cpp +++ b/src/win_main.cpp @@ -312,7 +312,14 @@ void MainWindow::startButtonPressed(void) void MainWindow::abortButtonPressed(void) { ENSURE_APP_IS_IDLE(); - m_jobList->abortJob(ui->jobsView->currentIndex()); + m_status = STATUS_BLOCKED; + + if(QMessageBox::question(this, tr("Abort Job?"), tr("Do you really want to abort the selected job now?"), tr("Back"), tr("Abort Job")) == 1) + { + m_jobList->abortJob(ui->jobsView->currentIndex()); + } + + m_status = STATUS_IDLE; } /*