[bugfix] now catching all cases

This commit is contained in:
Sebastian Wehling-Benatelli 2015-11-30 09:53:55 +01:00
parent d67556796c
commit 5f8569c7d9

View File

@ -611,15 +611,17 @@ class PickDlg(QDialog):
phase_col = {'P': ('c', 'c--', 'b-'), phase_col = {'P': ('c', 'c--', 'b-'),
'S': ('m', 'm--', 'r-')} 'S': ('m', 'm--', 'r-')}
if self.getPicks(): if self.getPicks():
if phase is not None: if phase is not None and type(self.getPicks()[phase]) is dict:
picks = self.getPicks()[phase] picks = self.getPicks()[phase]
colors = phase_col[phase[0].upper()] colors = phase_col[phase[0].upper()]
else: elif phase is None:
for phase in self.getPicks(): for phase in self.getPicks():
self.drawPicks(phase) self.drawPicks(phase)
return return
else: else:
return return
else:
return
mpp = picks['mpp'] - self.getStartTime() mpp = picks['mpp'] - self.getStartTime()
epp = picks['epp'] - self.getStartTime() epp = picks['epp'] - self.getStartTime()