mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
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>
This commit is contained in:
parent
0d7d347952
commit
106c682c03
2 changed files with 9 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ private slots:
|
|||
|
||||
private:
|
||||
bool ignoreSignal;
|
||||
bool isActive() const;
|
||||
Ui::FilterWidget2 ui;
|
||||
void filterDataChanged(const FilterData &data);
|
||||
FilterData filterData;
|
||||
|
|
Loading…
Add table
Reference in a new issue