diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-23 20:18:13 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-01 10:21:44 -0800 |
commit | d6114fc37e922c51341ea71cbcc58543d12f7a49 (patch) | |
tree | b55ec095508a23f61238075f127a0eeb1da95b87 /qt-models/divelistmodel.cpp | |
parent | 6f2a6fef140662e91de508785b3a43211a8b9d20 (diff) | |
download | subsurface-d6114fc37e922c51341ea71cbcc58543d12f7a49.tar.gz |
mobile/filter: derive numShown from a new Q_PROPERTY
The number of dives was updated when the model of the list was
changed. Since we removed the multi-threading, the model is
not disconnected/connected anymore and therefore we don't get
the appropriate signal. Instead of introducing a different
signal, make the shown-value a Q_PROPERTY. Thus, we can easily
send a changed signal if we have to.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divelistmodel.cpp')
-rw-r--r-- | qt-models/divelistmodel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp index d1ae4093d..f79efe0ff 100644 --- a/qt-models/divelistmodel.cpp +++ b/qt-models/divelistmodel.cpp @@ -195,6 +195,7 @@ DiveListSortModel *DiveListSortModel::instance() void DiveListSortModel::updateFilterState() { DiveFilter::instance()->updateAll(); + emit shownChanged(); } void DiveListSortModel::setSourceModel(QAbstractItemModel *sourceModel) |