From 106c682c03eb48b7248f05bc932cd7dbb9aac35b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 18 Feb 2019 12:43:34 -0800 Subject: 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 --- desktop-widgets/filterwidget2.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'desktop-widgets/filterwidget2.cpp') 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 -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; +} -- cgit v1.2.3-70-g09d2