From d67556796cc020273e55cda65db19cf07dd9d3b8 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Mon, 30 Nov 2015 09:52:31 +0100 Subject: [PATCH] [bugfix] plotting autopicks has to be done within thread because code outside the threads scope is executed in parallel --- pylot/core/util/thread.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pylot/core/util/thread.py b/pylot/core/util/thread.py index c0acb18d..a131e8fe 100644 --- a/pylot/core/util/thread.py +++ b/pylot/core/util/thread.py @@ -17,11 +17,16 @@ class AutoPickThread(QThread): picks = self.func(self.data, self.param) + print("Autopicking finished!\n") + try: for station in picks: - self.parent().addPicks(station, picks[station]) + self.parent().addPicks(station, picks[station], type='auto') except AttributeError: print(picks) + # plot picks to section + self.parent().drawPicks(picktype='auto') + def write(self, text): self.message.emit(text)