preparing to parse the picks to the picking window

This commit is contained in:
Sebastian Wehling-Benatelli 2015-07-07 11:02:46 +02:00
parent b8aabfce99
commit b8c92ed551
2 changed files with 8 additions and 3 deletions

View File

@ -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())

View File

@ -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