[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.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):
if not self.apd_local:
@ -1877,10 +1877,12 @@ class MainWindow(QMainWindow):
self.apd_sge = AutoPickDlg(self, sge=True)
self.apd_sge.show()
def finalizeAutoPick(self):
self.drawPicks(picktype='auto')
self.draw()
self.mp_thread.quit()
def finalizeAutoPick(self, result):
if result:
event = self.get_current_event()
event.addAutopicks(result)
self.drawPicks(picktype='auto')
self.draw()
def addPicks(self, station, picks, type='manual'):
stat_picks = self.getPicksOnStation(station, type)

View File

@ -134,7 +134,7 @@ class Worker(QRunnable):
#traceback.print_exc()
exctype, value = sys.exc_info ()[:2]
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:
self.signals.result.emit(result)
finally: