From a854cf2762959fae33335e90d39b2c2140bdacbb Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Sun, 28 Jun 2015 19:35:01 +0200 Subject: [PATCH] use default filter options for all expected phases set up by the project leader --- pylot/core/util/widgets.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 71c6cc5d..9d3718f3 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -567,21 +567,22 @@ class PickDlg(QDialog): old_title = self.getPlotWidget().getAxes().get_title() title = None phase = self.selectPhase.currentText() + filtoptions = None + if phase: + filtoptions = self.getFilterOptions(phase).parseFilterOptions() if self.filterAction.isChecked(): - if phase: - filtoptions = self.getFilterOptions(phase).parseFilterOptions() - else: + if not phase: filtoptions = FilterOptionsDialog.getFilterObject() filtoptions = filtoptions.parseFilterOptions() - if filtoptions is not None: - data.filter(**filtoptions) - if old_title.endswith(')'): - title = old_title[:-1] + ', filtered)' - else: - title = old_title + ' (filtered)' + if filtoptions is not None: + data.filter(**filtoptions) + if old_title.endswith(')'): + title = old_title[:-1] + ', filtered)' else: - if old_title.endswith(' (filtered)'): - title = old_title.replace(' (filtered)', '') + title = old_title + ' (filtered)' + else: + if old_title.endswith(' (filtered)'): + title = old_title.replace(' (filtered)', '') if title is None: title = old_title self.getPlotWidget().plotWFData(wfdata=data, title=title,