From 65df2c7ddeca7b40f61ef6782b662bc41bf9cf8e Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Fri, 25 Mar 2016 05:07:18 +0100 Subject: [PATCH] [closes #174] now the filter button in the picking window is no toggle button anymore and has no effect when in picking mode --- pylot/core/util/widgets.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 52d23d03..62e76cc9 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -180,6 +180,7 @@ class PickDlg(QDialog): else: self.picks = {} self.filteroptions = FILTERDEFAULTS + self.filt_block = False # initialize panning attributes self.press = None @@ -253,8 +254,7 @@ class PickDlg(QDialog): slot=self.filterWFData, icon=filter_icon, tip='Toggle filtered/original' - ' waveforms', - checkable=True) + ' waveforms') self.zoomAction = createAction(parent=self, text='Zoom', slot=self.zoom, icon=zoom_icon, tip='Zoom into waveform', @@ -354,6 +354,7 @@ class PickDlg(QDialog): self.disconnectPressEvent() self.cidpress = self.connectPressEvent(self.setIniPick) self.filterWFData() + self.filt_block = self.toggleFilterBlocker() else: self.disconnectPressEvent() self.cidpress = self.connectPressEvent(self.panPress) @@ -701,7 +702,12 @@ class PickDlg(QDialog): ax.figure.canvas.draw() + def toggleFilterBlocker(self): + return not self.filt_block + def filterWFData(self): + if self.filt_block: + return self.updateCurrentLimits() data = self.getWFData().copy() old_title = self.getPlotWidget().getAxes().get_title()