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>
This commit is contained in:
Berthold Stoeger 2020-03-07 19:12:03 +01:00 committed by Dirk Hohndel
parent 2e52f43d94
commit f7cf3e6b16

View file

@ -380,6 +380,7 @@ void DiveTripModelBase::clear()
oldCurrent = nullptr; oldCurrent = nullptr;
emit diveListNotifier.divesSelected({}, nullptr); // Inform profile, etc of changed selection emit diveListNotifier.divesSelected({}, nullptr); // Inform profile, etc of changed selection
endResetModel(); endResetModel();
emit diveListNotifier.numShownChanged();
} }
void DiveTripModelBase::reset() void DiveTripModelBase::reset()
@ -389,6 +390,7 @@ void DiveTripModelBase::reset()
populate(); populate();
endResetModel(); endResetModel();
initSelection(); initSelection();
emit diveListNotifier.numShownChanged();
} }
DiveTripModelBase::DiveTripModelBase(QObject *parent) : QAbstractItemModel(parent) DiveTripModelBase::DiveTripModelBase(QObject *parent) : QAbstractItemModel(parent)