[bugfix] retain filtering when switching events

This commit is contained in:
Marcel Paffrath 2018-01-09 12:04:03 +01:00
parent 00cdbb5052
commit 1324bf3d7c
2 changed files with 8 additions and 5 deletions

View File

@ -1750,6 +1750,8 @@ class MainWindow(QMainWindow):
comp = self.getComponent() comp = self.getComponent()
title = 'section: {0} components'.format(zne_text[comp]) title = 'section: {0} components'.format(zne_text[comp])
wfst = self.get_data().getWFData() wfst = self.get_data().getWFData()
if self.filterAction.isChecked():
self.filterWaveformData(plot=False)
# wfst = self.get_data().getWFData().select(component=comp) # wfst = self.get_data().getWFData().select(component=comp)
# wfst += self.get_data().getWFData().select(component=alter_comp) # wfst += self.get_data().getWFData().select(component=alter_comp)
plotWidget = self.getPlotWidget() plotWidget = self.getPlotWidget()
@ -1789,7 +1791,7 @@ class MainWindow(QMainWindow):
def pushFilterWF(self, param_args): def pushFilterWF(self, param_args):
self.get_data().filterWFData(param_args) self.get_data().filterWFData(param_args)
def filterWaveformData(self): def filterWaveformData(self, plot=True):
if self.get_data(): if self.get_data():
if self.getFilterOptions() and self.filterAction.isChecked(): if self.getFilterOptions() and self.filterAction.isChecked():
kwargs = self.getFilterOptions()[self.getSeismicPhase()].parseFilterOptions() kwargs = self.getFilterOptions()[self.getSeismicPhase()].parseFilterOptions()
@ -1798,9 +1800,10 @@ class MainWindow(QMainWindow):
self.adjustFilterOptions() self.adjustFilterOptions()
else: else:
self.get_data().resetWFData() self.get_data().resetWFData()
self.plotWaveformDataThread() if plot:
self.drawPicks() self.plotWaveformDataThread()
self.draw() self.drawPicks()
self.draw()
def adjustFilterOptions(self): def adjustFilterOptions(self):
fstring = "Filter Options" fstring = "Filter Options"

View File

@ -1 +1 @@
4150e-dirty 00cd-dirty