From 39e048cf2f896be5e23c32d3293a69cf05c459e6 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 9 Jan 2018 13:46:21 +0100 Subject: [PATCH] [bugfix] rectangle zoom connection --- pylot/RELEASE-VERSION | 2 +- pylot/core/util/widgets.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index e4bc253c..8c4410a4 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -7be9-dirty +440c-dirty diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 6bb8886b..c339db5d 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -1283,7 +1283,7 @@ class PickDlg(QDialog): tip='Zoom into waveform', checkable=True) self.resetZoomAction = createAction(parent=self, text='Home', - slot=self.resetZoom, icon=home_icon, + slot=self.resetPlot, icon=home_icon, tip='Reset zoom to original limits') self.resetPicksAction = createAction(parent=self, text='Delete Picks', slot=self.delPicks, icon=del_icon, @@ -2223,8 +2223,9 @@ class PickDlg(QDialog): settings.setValue('autoFilter', self.autoFilterAction.isChecked()) def resetPlot(self): - self.filterActionP.setChecked(False) - self.filterActionS.setChecked(False) + if self.autoFilterAction.isChecked(): + self.filterActionP.setChecked(False) + self.filterActionS.setChecked(False) self.resetZoom() data = self.getWFData().copy() #title = self.multicompfig.axes[0].get_title() @@ -2240,7 +2241,8 @@ class PickDlg(QDialog): ax = self.multicompfig.axes[0] self.setXLims(self.multicompfig.getGlobalLimits(ax, 'x')) self.setYLims(self.multicompfig.getGlobalLimits(ax, 'y')) - self.multicompfig.connectEvents() + if not self.zoomAction.isChecked(): + self.multicompfig.connectEvents() def setPlotLabels(self):