mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Filter: cache number of dives fulfilling filter rules
Currently, in FilterModelBase::data() the number of dives is recalculated. This happens for every mouse-over event! Calculate the number of dives only on recalculation and store the count in the items-struct. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e3f8615054
commit
66aeaddd0f
2 changed files with 13 additions and 3 deletions
|
@ -14,6 +14,7 @@ class FilterModelBase : public QStringListModel {
|
|||
protected:
|
||||
struct Item {
|
||||
bool checked;
|
||||
int count;
|
||||
};
|
||||
std::vector<Item> items;
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue