]> SALOME platform Git repositories - modules/jobmanager.git/commitdiff
Salome HOME
Multiple selected jobs can be stopped if their status are ok
authorribes <ribes>
Wed, 12 Oct 2011 16:33:12 +0000 (16:33 +0000)
committerribes <ribes>
Wed, 12 Oct 2011 16:33:12 +0000 (16:33 +0000)
src/genericgui/BL_GenericGui.cxx

index 85603c1abe8cfe92cc29665e8e2ac7267115c9c5..f5d1d1ccd1f5c3bd82fa9321864a43393fc6f875 100644 (file)
@@ -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());
+    }
+  }
 }