[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)
else:
self.data = Data(self)
self.autodata = Data(self)
# load and display waveform data
self.dirty = False
@ -432,10 +433,11 @@ class MainWindow(QMainWindow):
if isinstance(action, QAction):
fname = self.filename_from_action(action)
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:
self.updatePicks(type=type)
self.drawPicks()
self.drawPicks(picktype=type)
self.draw()
def getLastEvent(self):

View File

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