[bugfix] some small fixes regarding plotting and reading notes.txt

This commit is contained in:
Marcel Paffrath 2019-04-18 11:21:56 +02:00
parent 20dc5a132a
commit 77eec8e94c
3 changed files with 9 additions and 3 deletions

View File

@ -2824,6 +2824,8 @@ class MainWindow(QMainWindow):
# stat_picks, self._inputs, phaseID,
# compclass)
if not picks['mpp']: continue
mpp = picks['mpp'] - stime
if picks['epp'] and picks['lpp']:
epp = picks['epp'] - stime

View File

@ -259,6 +259,10 @@ class Data(object):
'supported'.format(e, fnext)
raise FormatError(errmsg)
if hasattr(self.get_evt_data(), 'notes'):
with open(os.path.join(os.path.dirname(fnout), 'notes.txt'), 'w') as notes_file:
notes_file.write(self.get_evt_data().notes)
# check for already existing xml-file
if fnext == '.xml':
if os.path.isfile(fnout + fnext):
@ -275,7 +279,7 @@ class Data(object):
self.checkEvent(event, fcheck)
self.setEvtData(event)
self.get_evt_data().write(fnout + fnext, format=evtformat)
# try exporting event
# try exporting event
else:
evtdata_org = self.get_evt_data()
picks = evtdata_org.picks

View File

@ -2591,8 +2591,8 @@ class PickDlg(QDialog):
or type(self.getPicks(picktype)[phase]) is AttribDict):
picks = self.getPicks(picktype)[phase]
elif phase is None:
for phase in self.getPicks(picktype):
self.drawPicks(phase, picktype, textOnly)
for phase, picks in self.getPicks(picktype).items():
self.drawPicks(phase, picktype, textOnly, picks)
return
else:
return