diff options
author | 2020-02-09 22:47:47 +0100 | |
---|---|---|
committer | 2020-02-22 15:18:31 -0800 | |
commit | 7633d5feecf3cf2129f41b10ea293beb4c483d02 (patch) | |
tree | 9bd0b86187fa7bcaaf8f1863bbeeeae6900a5989 /qt-models/divecomputerextradatamodel.cpp | |
parent | e761d00ddd68560e0f2b9d2f8650594978fa1168 (diff) | |
download | subsurface-7633d5feecf3cf2129f41b10ea293beb4c483d02.tar.gz |
Dive list: filter dives at DiveTripModel level
We use a QFilterProxyModel to filter out dives that are hidden
according to the current filter-criterion. Instead, filter the
dives already at the DiveTripModel level. Filter out hidden
dives immediately when receiving them. The only difficult case
is when dives are changed, because then visibility can change.
This means that we have three cases to consider:
1) Visibility unchanged -> send change signal
2) Change from hidden to unhidden -> add dives to model
3) Change from unhidden to hidden -> remove dives from model
Things get complicated by the fact that the tree-version of
the model might have to add/remove full trips!
Suggested-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divecomputerextradatamodel.cpp')
0 files changed, 0 insertions, 0 deletions