diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2018-11-16 15:24:11 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-12-14 01:05:18 +0800 |
commit | 43178be1f23dca936b177b79245818e971bedde3 (patch) | |
tree | 26a9e653b02c375b173fa739753735cb7bb94aea /desktop-widgets/filterwidget2.cpp | |
parent | 81bb6086c0e7f7ba6d4100a49cc9cf32556caaaf (diff) | |
download | subsurface-43178be1f23dca936b177b79245818e971bedde3.tar.gz |
Handle Show / Close of the Filter Box
when you close, remove filter. when you open again, restore.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'desktop-widgets/filterwidget2.cpp')
-rw-r--r-- | desktop-widgets/filterwidget2.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/desktop-widgets/filterwidget2.cpp b/desktop-widgets/filterwidget2.cpp index 50cad019a..473a4ad54 100644 --- a/desktop-widgets/filterwidget2.cpp +++ b/desktop-widgets/filterwidget2.cpp @@ -81,5 +81,19 @@ void FilterWidget2::updateFilter() data.equipment = ui->equipment->text().split(",", QString::SkipEmptyParts); data.invertFilter = ui->invertFilter->isChecked(); + filterData = data; + emit filterDataChanged(data); +} + +void FilterWidget2::showEvent(QShowEvent *event) +{ + QWidget::showEvent(event); + emit filterDataChanged(filterData); +} + +void FilterWidget2::hideEvent(QHideEvent *event) +{ + QWidget::hideEvent(event); + FilterData data; emit filterDataChanged(data); } |