[fixed] loading of automatic picks did not plot any result (fixed in this rev)

This commit is contained in:
Sebastian Wehling-Benatelli 2016-06-01 08:55:43 +02:00
parent 62b1a4e670
commit 0d7ee9d779
2 changed files with 5 additions and 3 deletions

View File

@ -109,6 +109,7 @@ class MainWindow(QMainWindow):
self.data = Data(self, lastEvent) self.data = Data(self, lastEvent)
else: else:
self.data = Data(self) self.data = Data(self)
self.autodata = Data(self)
# load and display waveform data # load and display waveform data
self.dirty = False self.dirty = False
@ -432,10 +433,11 @@ class MainWindow(QMainWindow):
if isinstance(action, QAction): if isinstance(action, QAction):
fname = self.filename_from_action(action) fname = self.filename_from_action(action)
self.set_fname(fname, type) self.set_fname(fname, type)
self.data += Data(self, evtdata=fname) data = dict(auto=self.autodata, manual=self.data)
data[type] += Data(self, evtdata=fname)
if 'loc' not in type: if 'loc' not in type:
self.updatePicks(type=type) self.updatePicks(type=type)
self.drawPicks() self.drawPicks(picktype=type)
self.draw() self.draw()
def getLastEvent(self): def getLastEvent(self):

View File

@ -40,7 +40,7 @@ class Data(object):
elif isinstance(evtdata, dict): elif isinstance(evtdata, dict):
evt = readPILOTEvent(**evtdata) evt = readPILOTEvent(**evtdata)
evtdata = evt evtdata = evt
elif isinstance(evtdata, str): elif isinstance(evtdata, basestring):
try: try:
cat = read_events(evtdata) cat = read_events(evtdata)
if len(cat) is not 1: if len(cat) is not 1: