From 7dc963143dc9f469ce0736df1482a2531ed581fe Mon Sep 17 00:00:00 2001 From: Joachim Beerwerth Date: Mon, 9 Apr 2018 16:53:04 +0200 Subject: [PATCH] Fix stopping queued experiment --- src/gui/DamarisGUI.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/DamarisGUI.py b/src/gui/DamarisGUI.py index 282b9ae..46e2946 100644 --- a/src/gui/DamarisGUI.py +++ b/src/gui/DamarisGUI.py @@ -462,7 +462,7 @@ class DamarisGUI: self.stop_experiment_flag.clear() self.id = self.lockfile.add_experiment() - while not self.lockfile.am_i_next() and not self.stop_experiment_flag.isSet(): + while not self.lockfile.am_i_next(): self.stop_experiment_flag.wait(interval) while gtk.events_pending(): gtk.main_iteration(False) @@ -470,6 +470,10 @@ class DamarisGUI: self.experiment_script_statusbar_label.set_text("Waiting for other experiment to finish") loop_run = 0 loop_run += interval + + if self.stop_experiment_flag.isSet(): + self.experiment_script_statusbar_label.set_text("Experiment stopped") + return # start experiment try: