[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, # stat_picks, self._inputs, phaseID,
# compclass) # compclass)
if not picks['mpp']: continue
mpp = picks['mpp'] - stime mpp = picks['mpp'] - stime
if picks['epp'] and picks['lpp']: if picks['epp'] and picks['lpp']:
epp = picks['epp'] - stime epp = picks['epp'] - stime

View File

@ -259,6 +259,10 @@ class Data(object):
'supported'.format(e, fnext) 'supported'.format(e, fnext)
raise FormatError(errmsg) 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 # check for already existing xml-file
if fnext == '.xml': if fnext == '.xml':
if os.path.isfile(fnout + fnext): if os.path.isfile(fnout + fnext):

View File

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