diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-08-27 12:53:46 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-28 05:03:59 -0700 |
commit | 66aeaddd0f9ccdb46bb0879c8a9f7e6181c3d571 (patch) | |
tree | 27afd6a46d0a7e7f6a2cf84a28846be999d490ef /qt-models/filtermodels.h | |
parent | e3f8615054250d3e6fe0eb53f04bed229646e2d4 (diff) | |
download | subsurface-66aeaddd0f9ccdb46bb0879c8a9f7e6181c3d571.tar.gz |
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>
Diffstat (limited to 'qt-models/filtermodels.h')
-rw-r--r-- | qt-models/filtermodels.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h index 8bac44680..846949809 100644 --- a/qt-models/filtermodels.h +++ b/qt-models/filtermodels.h @@ -14,6 +14,7 @@ class FilterModelBase : public QStringListModel { protected: struct Item { bool checked; + int count; }; std::vector<Item> items; public: |