[closes #174] now the filter button in the picking window is no toggle button anymore and has no effect when in picking mode

This commit is contained in:
Sebastian Wehling-Benatelli 2016-03-25 05:07:18 +01:00
parent b8d680f54f
commit 65df2c7dde

View File

@ -180,6 +180,7 @@ class PickDlg(QDialog):
else: else:
self.picks = {} self.picks = {}
self.filteroptions = FILTERDEFAULTS self.filteroptions = FILTERDEFAULTS
self.filt_block = False
# initialize panning attributes # initialize panning attributes
self.press = None self.press = None
@ -253,8 +254,7 @@ class PickDlg(QDialog):
slot=self.filterWFData, slot=self.filterWFData,
icon=filter_icon, icon=filter_icon,
tip='Toggle filtered/original' tip='Toggle filtered/original'
' waveforms', ' waveforms')
checkable=True)
self.zoomAction = createAction(parent=self, text='Zoom', self.zoomAction = createAction(parent=self, text='Zoom',
slot=self.zoom, icon=zoom_icon, slot=self.zoom, icon=zoom_icon,
tip='Zoom into waveform', tip='Zoom into waveform',
@ -354,6 +354,7 @@ class PickDlg(QDialog):
self.disconnectPressEvent() self.disconnectPressEvent()
self.cidpress = self.connectPressEvent(self.setIniPick) self.cidpress = self.connectPressEvent(self.setIniPick)
self.filterWFData() self.filterWFData()
self.filt_block = self.toggleFilterBlocker()
else: else:
self.disconnectPressEvent() self.disconnectPressEvent()
self.cidpress = self.connectPressEvent(self.panPress) self.cidpress = self.connectPressEvent(self.panPress)
@ -701,7 +702,12 @@ class PickDlg(QDialog):
ax.figure.canvas.draw() ax.figure.canvas.draw()
def toggleFilterBlocker(self):
return not self.filt_block
def filterWFData(self): def filterWFData(self):
if self.filt_block:
return
self.updateCurrentLimits() self.updateCurrentLimits()
data = self.getWFData().copy() data = self.getWFData().copy()
old_title = self.getPlotWidget().getAxes().get_title() old_title = self.getPlotWidget().getAxes().get_title()