aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-07 19:12:03 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-07 12:04:19 -0800
commitf7cf3e6b165a04160f07ec3e3b4810a6b7ef3d31 (patch)
tree7ba95002382368dd640205277835474a606da790 /qt-models
parent2e52f43d9422e0ce8d9b52fb8556a5e312af3718 (diff)
downloadsubsurface-f7cf3e6b165a04160f07ec3e3b4810a6b7ef3d31.tar.gz
divetripmodel: send shown changed signal on reset
Once the the mobile app uses the new models, this will be necessary to get the correct number of filtered dives after startup. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divetripmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp
index a2a72ded3..52bfcf7f5 100644
--- a/qt-models/divetripmodel.cpp
+++ b/qt-models/divetripmodel.cpp
@@ -380,6 +380,7 @@ void DiveTripModelBase::clear()
oldCurrent = nullptr;
emit diveListNotifier.divesSelected({}, nullptr); // Inform profile, etc of changed selection
endResetModel();
+ emit diveListNotifier.numShownChanged();
}
void DiveTripModelBase::reset()
@@ -389,6 +390,7 @@ void DiveTripModelBase::reset()
populate();
endResetModel();
initSelection();
+ emit diveListNotifier.numShownChanged();
}
DiveTripModelBase::DiveTripModelBase(QObject *parent) : QAbstractItemModel(parent)