From: ribes Date: Wed, 12 Oct 2011 16:33:12 +0000 (+0000) Subject: Multiple selected jobs can be stopped if their status are ok X-Git-Tag: V6_4_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=927073757e9fb78830620ccda1bf844ba7dd4a8b;p=modules%2Fjobmanager.git Multiple selected jobs can be stopped if their status are ok --- 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()); + } + } }