Fix stopping queued experiment

This commit is contained in:
Joachim Beerwerth 2018-04-09 16:53:04 +02:00
parent 3a81893a25
commit 7dc963143d

View File

@ -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: