summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/filterwidget2.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-11-17 16:23:00 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-19 21:13:40 -0800
commit2d09819ddfc6bbb4eb9bd7127485f42c839fd85b (patch)
tree9cdd417a2f266faaec73a9a2bfe5f599ac60a82f /desktop-widgets/filterwidget2.cpp
parentcbd98edb73e26b3b3d9068823d9155c61cb3a9b2 (diff)
downloadsubsurface-2d09819ddfc6bbb4eb9bd7127485f42c839fd85b.tar.gz
Filter: move number of shown dives to core
We mark hidden/shown dives in the core but store the number of shown dives in the MultiFilterSortModel. Move this datum to the core for improved locality. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/filterwidget2.cpp')
-rw-r--r--desktop-widgets/filterwidget2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/filterwidget2.cpp b/desktop-widgets/filterwidget2.cpp
index bbb0aa124..0ab6bb022 100644
--- a/desktop-widgets/filterwidget2.cpp
+++ b/desktop-widgets/filterwidget2.cpp
@@ -2,6 +2,7 @@
#include "desktop-widgets/simplewidgets.h"
#include "desktop-widgets/mainwindow.h"
#include "core/qthelper.h"
+#include "core/divelist.h"
#include "core/settings/qPrefUnit.h"
#include <QDoubleSpinBox>
@@ -242,8 +243,7 @@ void FilterWidget2::filterDataChanged(const FilterData &data)
QString FilterWidget2::shownText()
{
if (isActive())
- return tr("%L1/%L2 shown").arg(MultiFilterSortModel::instance()->divesDisplayed)
- .arg(dive_table.nr);
+ return tr("%L1/%L2 shown").arg(shown_dives).arg(dive_table.nr);
else
return tr("%L1 dives").arg(dive_table.nr);
}