From 224c6b625c5ecc002d48e00d67ea92152f6ecdc1 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Mon, 27 Oct 2014 12:19:04 +0100 Subject: [PATCH] FilterOptionsDialog processes parameter filter option of type FilterOption --- pylot/core/util/widgets.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index c3f15704..20ebc95c 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -148,22 +148,17 @@ class GraphicsTab(QWidget): pass -class FilterOptionsDock(QDialog): +class FilterOptionsDialog(QDialog): def __init__(self, parent=None, titleString="Filter options", filterOptions=None): - super(FilterOptionsDock, self).__init__() - - if filterOptions and not isinstance(filterOptions, FilterOptions): - try: - fOptions = FilterOptions(**filterOptions) - filterOptions = fOptions - except Exception, e: - raise OptionsError('%s' % e) - else: - filterOptions = FilterOptions() - - self.filterOptions = filterOptions + """ + PyLoT widget FilterOptionsDialog is a QDialog object. It is an UI to + adjust parameters for filtering seismic data. + """ + super(FilterOptionsDialog, self).__init__() + + self.filterOptions = [filterOptions if filterOptions is not None else FilterOptions()][0] self.freqminLabel = QLabel() self.freqminLabel.setText("minimum:")