[closes #232] load autopicks automatically

This commit is contained in:
Marcel Paffrath 2017-08-16 10:03:10 +02:00
parent 2c054161c1
commit 256f3b6838
2 changed files with 8 additions and 6 deletions

View File

@ -1865,7 +1865,7 @@ class MainWindow(QMainWindow):
self.addListItem(str(self._inputs)) self.addListItem(str(self._inputs))
self.mp_worker.signals.message.connect(self.addListItem) self.mp_worker.signals.message.connect(self.addListItem)
# self.mp_thread.finished.connect(self.finalizeAutoPick) self.mp_worker.signals.result.connect(self.finalizeAutoPick)
def autoPickProject(self): def autoPickProject(self):
if not self.apd_local: if not self.apd_local:
@ -1877,10 +1877,12 @@ class MainWindow(QMainWindow):
self.apd_sge = AutoPickDlg(self, sge=True) self.apd_sge = AutoPickDlg(self, sge=True)
self.apd_sge.show() self.apd_sge.show()
def finalizeAutoPick(self): def finalizeAutoPick(self, result):
self.drawPicks(picktype='auto') if result:
self.draw() event = self.get_current_event()
self.mp_thread.quit() event.addAutopicks(result)
self.drawPicks(picktype='auto')
self.draw()
def addPicks(self, station, picks, type='manual'): def addPicks(self, station, picks, type='manual'):
stat_picks = self.getPicksOnStation(station, type) stat_picks = self.getPicksOnStation(station, type)

View File

@ -134,7 +134,7 @@ class Worker(QRunnable):
#traceback.print_exc() #traceback.print_exc()
exctype, value = sys.exc_info ()[:2] exctype, value = sys.exc_info ()[:2]
print(exctype, value, traceback.format_exc()) print(exctype, value, traceback.format_exc())
#self.signals.error.emit ((exctype, value, traceback.format_exc ())) self.signals.error.emit ((exctype, value, traceback.format_exc ()))
else: else:
self.signals.result.emit(result) self.signals.result.emit(result)
finally: finally: