diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-02-18 12:43:34 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-02-19 12:02:58 -0800 |
commit | 106c682c03eb48b7248f05bc932cd7dbb9aac35b (patch) | |
tree | 86cebe20693dacd6b366b8b9efaa8699f60b44ee /desktop-widgets/filterwidget2.cpp | |
parent | 0d7d3479521e520a25b150ce832a7504e3ac00f1 (diff) | |
download | subsurface-106c682c03eb48b7248f05bc932cd7dbb9aac35b.tar.gz |
Desktop: track if the filter widget is active
This is not perfect - if you open the filter, set some criterion and then
remove it again (without resetting the filter), this variable will give you a
false positive).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/filterwidget2.cpp')
-rw-r--r-- | desktop-widgets/filterwidget2.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/desktop-widgets/filterwidget2.cpp b/desktop-widgets/filterwidget2.cpp index 77cefa5a8..24a66513e 100644 --- a/desktop-widgets/filterwidget2.cpp +++ b/desktop-widgets/filterwidget2.cpp @@ -6,7 +6,9 @@ #include <QDoubleSpinBox> -FilterWidget2::FilterWidget2(QWidget* parent) : QWidget(parent), ignoreSignal(false) +FilterWidget2::FilterWidget2(QWidget* parent) : + QWidget(parent), + ignoreSignal(false) { ui.setupUi(this); @@ -231,3 +233,8 @@ void FilterWidget2::countsChanged() ui.filterText->setText(tr("%L1/%L2 shown").arg(MultiFilterSortModel::instance()->divesDisplayed) .arg(dive_table.nr)); } + +bool FilterWidget2::isActive() const +{ + return filterData.validFilter; +} |