[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,6 +1800,7 @@ class MainWindow(QMainWindow):
self.adjustFilterOptions() self.adjustFilterOptions()
else: else:
self.get_data().resetWFData() self.get_data().resetWFData()
if plot:
self.plotWaveformDataThread() self.plotWaveformDataThread()
self.drawPicks() self.drawPicks()
self.draw() self.draw()

View File

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