[bugfix] now filtering in the main window works; filter parameters are not stored -> has to be checked again
This commit is contained in:
parent
2201c3ea4d
commit
a31e1a21f0
25
QtPyLoT.py
25
QtPyLoT.py
@ -536,38 +536,31 @@ class MainWindow(QMainWindow):
|
|||||||
self.plotWaveformData()
|
self.plotWaveformData()
|
||||||
self.drawPicks()
|
self.drawPicks()
|
||||||
|
|
||||||
|
def pushFilterWF(self, param_args):
|
||||||
|
self.getData().filterWFData(param_args)
|
||||||
|
|
||||||
def filterWaveformData(self):
|
def filterWaveformData(self):
|
||||||
if self.getData():
|
if self.getData():
|
||||||
def hasfreq(kwdict):
|
|
||||||
for key in kwdict.keys():
|
|
||||||
if not key.startswith('freq'):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def pushFilterWF(kwdict):
|
|
||||||
if hasfreq(kwargs):
|
|
||||||
self.getData().filterWFData(kwargs)
|
|
||||||
|
|
||||||
if self.getFilterOptions() and self.filterAction.isChecked():
|
if self.getFilterOptions() and self.filterAction.isChecked():
|
||||||
kwargs = self.getFilterOptions().parseFilterOptions()
|
kwargs = self.getFilterOptions().parseFilterOptions()
|
||||||
pushFilterWF(kwargs)
|
self.pushFilterWF(kwargs)
|
||||||
elif self.filterAction.isChecked():
|
elif self.filterAction.isChecked():
|
||||||
self.adjustFilterOptions()
|
self.adjustFilterOptions()
|
||||||
kwargs = self.getFilterOptions().parseFilterOptions()
|
|
||||||
pushFilterWF(kwargs)
|
|
||||||
else:
|
else:
|
||||||
self.getData().resetWFData()
|
self.getData().resetWFData()
|
||||||
self.plotWaveformData()
|
self.plotWaveformData()
|
||||||
|
|
||||||
def adjustFilterOptions(self):
|
def adjustFilterOptions(self):
|
||||||
filteroptions = self.getFilterOptions()
|
|
||||||
fstring = "Filter Options ({0})".format(self.getSeismicPhase())
|
fstring = "Filter Options ({0})".format(self.getSeismicPhase())
|
||||||
filterDlg = FilterOptionsDialog(titleString=fstring,
|
filterDlg = FilterOptionsDialog(titleString=fstring,
|
||||||
parent=self,
|
parent=self)
|
||||||
filterOptions=filteroptions)
|
|
||||||
if filterDlg.exec_():
|
if filterDlg.exec_():
|
||||||
filteroptions = filterDlg.getFilterOptions()
|
filteroptions = filterDlg.getFilterOptions()
|
||||||
self.setFilterOptions(filteroptions)
|
self.setFilterOptions(filteroptions)
|
||||||
|
if self.filterAction.isChecked():
|
||||||
|
kwargs = self.getFilterOptions().parseFilterOptions()
|
||||||
|
self.pushFilterWF(kwargs)
|
||||||
|
self.plotWaveformData()
|
||||||
|
|
||||||
def getFilterOptions(self):
|
def getFilterOptions(self):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user