From 3ae166b14713d250296a0e472fd7f8b0343a3a15 Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Thu, 29 Jun 2017 10:23:45 +0200 Subject: [PATCH] [bugfix] picks not plotted in PickDlg if type(picks .or. picksdict) was AttribDict instead of dict --- pylot/core/util/widgets.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 6eda72b8..fe4bc44e 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -35,6 +35,7 @@ from PySide.QtGui import QAction, QApplication, QCheckBox, QComboBox, \ from PySide.QtCore import QSettings, Qt, QUrl, Signal, Slot from PySide.QtWebKit import QWebView from obspy import Stream, UTCDateTime +from obspy.core.util import AttribDict from pylot.core.io.data import Data from pylot.core.io.inputs import FilterOptions, PylotParameter from pylot.core.pick.utils import getSNR, earllatepicker, getnoisewin, \ @@ -1360,9 +1361,11 @@ class PickDlg(QDialog): 'S': ('m', 'm--', 'r-', 'rv', 'r^', 'r', 'm:') } if self.getPicks(picktype): - if phase is not None and type(self.getPicks(picktype)[phase]) is dict: - picks = self.getPicks(picktype)[phase] - colors = phase_col[phase[0].upper()] + if phase is not None: + if (type(self.getPicks(picktype)[phase]) is dict + or type(self.getPicks(picktype)[phase]) is AttribDict): + picks = self.getPicks(picktype)[phase] + colors = phase_col[phase[0].upper()] elif phase is None: for phase in self.getPicks(picktype): self.drawPicks(phase, picktype)