summaryrefslogtreecommitdiffstats
path: root/qt-models/divetripmodel.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-30 21:28:11 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-29 08:34:09 -0800
commite80c0d2c60e53071632095322845c32c80767f6f (patch)
treeeb46dadc370569190b2b14a362678c5307f8ded4 /qt-models/divetripmodel.cpp
parentdea1ef84d50620d8030566d058c39d9d50f7c5df (diff)
downloadsubsurface-e80c0d2c60e53071632095322845c32c80767f6f.tar.gz
filter: reset shown_dives in filter
The shown_dives variable was reset by the dive_list code. Arguably, the filter should keep track of the number of shown dives, so move the resetting there. This means adding a new "reset()" member function to the filter and call that instead of "updateAll()" when the core data is reset. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divetripmodel.cpp')
-rw-r--r--qt-models/divetripmodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp
index a0385822c..358d032a6 100644
--- a/qt-models/divetripmodel.cpp
+++ b/qt-models/divetripmodel.cpp
@@ -706,7 +706,7 @@ DiveTripModelTree::DiveTripModelTree(QObject *parent) : DiveTripModelBase(parent
void DiveTripModelTree::populate()
{
- DiveFilter::instance()->updateAll(); // The data was reset - update filter status. TODO: should this really be done here?
+ DiveFilter::instance()->reset(); // The data was reset - update filter status. TODO: should this really be done here?
// we want this to be two calls as the second text is overwritten below by the lines starting with "\r"
uiNotification(QObject::tr("populate data model"));
@@ -1475,7 +1475,7 @@ DiveTripModelList::DiveTripModelList(QObject *parent) : DiveTripModelBase(parent
void DiveTripModelList::populate()
{
- DiveFilter::instance()->updateAll(); // The data was reset - update filter status. TODO: should this really be done here?
+ DiveFilter::instance()->reset(); // The data was reset - update filter status. TODO: should this really be done here?
// Fill model
items.reserve(dive_table.nr);