diff --git a/QtPyLoT.py b/QtPyLoT.py index 2a547fb6..319ad8db 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -507,7 +507,8 @@ class MainWindow(QMainWindow): self.updateStatus('picking on station {0}'.format(station)) data = self.getData().getWFData() pickDlg = PickDlg(self, data=data.select(station=station), - station=station) + station=station, + picks=self.getPicksOnStation(station)) if pickDlg.exec_(): self.updateStatus('picks accepted ({0})'.format(station)) self.addPicks(station, pickDlg.getPicks()) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index b8f2e784..df7bf40c 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -158,14 +158,18 @@ class MPLWidget(FigureCanvas): axann.set_bbox(dict(facecolor='lightgrey', alpha=.6)) class PickDlg(QDialog): - def __init__(self, parent=None, data=None, station=None, rotate=False): + def __init__(self, parent=None, data=None, station=None, picks=None, + rotate=False): super(PickDlg, self).__init__(parent) # initialize attributes self.station = station self.rotate = rotate self.components = 'ZNE' - self.picks = {} + if picks: + self.picks = picks + else: + self.picks = {} self.filteroptions = FILTERDEFAULTS # initialize panning attributes