From 927073757e9fb78830620ccda1bf844ba7dd4a8b Mon Sep 17 00:00:00 2001 From: ribes Date: Wed, 12 Oct 2011 16:33:12 +0000 Subject: [PATCH] Multiple selected jobs can be stopped if their status are ok --- src/genericgui/BL_GenericGui.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/genericgui/BL_GenericGui.cxx b/src/genericgui/BL_GenericGui.cxx index 85603c1..f5d1d1c 100644 --- a/src/genericgui/BL_GenericGui.cxx +++ b/src/genericgui/BL_GenericGui.cxx @@ -251,7 +251,19 @@ void BL::GenericGui::stop_job() { DEBTRACE("Stop Job Slot BL::GenericGui"); - _jobs_manager->stop_job(_job_name_selected.toStdString()); + if (!_jobs_table->isMultipleSelected()) + { + _jobs_manager->stop_job(_job_name_selected.toStdString()); + } + else + { + QModelIndexList selected_rows = _jobs_table->selectionModel()->selectedRows(); + for (int i = 0; i < selected_rows.length(); ++i) + { + QString job_name = _model->itemFromIndex(selected_rows[i])->text(); + _jobs_manager->stop_job(job_name.toStdString()); + } + } } -- 2.39.2