mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Undo: update filter flag when dives change
The filter code is strange: it actually only checks the dive->hidden_by_filter flag. Thus, before propagating the dive changed signal, this flag has to be updated. Do this in the DiveTripModel. Ultimately, this should be refactored. Moreover, if the filter-flag changed notify the frontend of a changed trip so that the trip is hidden / unhidden. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e7063b6b08
commit
9afea37e15
4 changed files with 46 additions and 3 deletions
|
@ -60,6 +60,7 @@ public:
|
|||
static MultiFilterSortModel *instance();
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
|
||||
bool showDive(const struct dive *d) const;
|
||||
bool updateDive(struct dive *d); // returns true if visibility status changed
|
||||
int divesDisplayed;
|
||||
bool lessThan(const QModelIndex &, const QModelIndex &) const override;
|
||||
public
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue