aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/filterwidget2.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-12-16 20:33:37 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-01-19 13:59:24 -0800
commitcc0c4ab2f16612a145064887614e3f86fe125209 (patch)
tree2b092836ebc2db2501a3b1f5d046a1facf2aec88 /desktop-widgets/filterwidget2.cpp
parent891fcbf520f28ef6016d6171eba83c6773efca00 (diff)
downloadsubsurface-cc0c4ab2f16612a145064887614e3f86fe125209.tar.gz
Filter: connect widget and filter
In the latest version of the new filter-widget the connection between widget and filter was lost. Connect both - but use a simple function call instead of a signal, since it is not immediately obivous where the connection should be made. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/filterwidget2.cpp')
-rw-r--r--desktop-widgets/filterwidget2.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/desktop-widgets/filterwidget2.cpp b/desktop-widgets/filterwidget2.cpp
index b2f74d742..fdf2bb843 100644
--- a/desktop-widgets/filterwidget2.cpp
+++ b/desktop-widgets/filterwidget2.cpp
@@ -97,7 +97,7 @@ void FilterWidget2::updateFilter()
data.planned = ui->planned->isChecked();
filterData = data;
- emit filterDataChanged(data);
+ filterDataChanged(data);
}
void FilterWidget2::updateLogged(int value) {
@@ -116,12 +116,17 @@ void FilterWidget2::updatePlanned(int value) {
void FilterWidget2::showEvent(QShowEvent *event)
{
QWidget::showEvent(event);
- emit filterDataChanged(filterData);
+ filterDataChanged(filterData);
}
void FilterWidget2::hideEvent(QHideEvent *event)
{
QWidget::hideEvent(event);
FilterData data;
- emit filterDataChanged(data);
+ filterDataChanged(data);
+}
+
+void FilterWidget2::filterDataChanged(const FilterData &data)
+{
+ MultiFilterSortModel::instance()->filterDataChanged(data);
}