mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
979f81f409
The filter code was an unholy intermixture of backend and frontend logic, which made it hard to access it from outside of the UI. Notably, it expected that Qt would call filterAcceptsRow on all rows. For trip-view, apparently the filter functions were called twice (once for filtering the trip, then for filtering the individual dives). Make the filtering explicit, by calling showDive() for all dives in MultiFilterSortModel::myInvalidate(), setting the hidden_by_filter flags accordingly and ultimately invalidating the filter. The UI code only accesses the hidden_by_filter flag set previously. The "justCleared" flag can then be removed, since accessing the filter does not have side effects. Moreover, there is no noticeable performance gain by returning out early. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> |
||
---|---|---|
.. | ||
cleanertablemodel.cpp | ||
cleanertablemodel.h | ||
CMakeLists.txt | ||
completionmodels.cpp | ||
completionmodels.h | ||
cylindermodel.cpp | ||
cylindermodel.h | ||
divecomputerextradatamodel.cpp | ||
divecomputerextradatamodel.h | ||
divecomputermodel.cpp | ||
divecomputermodel.h | ||
diveimportedmodel.cpp | ||
diveimportedmodel.h | ||
divelistmodel.cpp | ||
divelistmodel.h | ||
divelocationmodel.cpp | ||
divelocationmodel.h | ||
divepicturemodel.cpp | ||
divepicturemodel.h | ||
diveplannermodel.cpp | ||
diveplannermodel.h | ||
diveplotdatamodel.cpp | ||
diveplotdatamodel.h | ||
divetripmodel.cpp | ||
divetripmodel.h | ||
filtermodels.cpp | ||
filtermodels.h | ||
gpslistmodel.cpp | ||
gpslistmodel.h | ||
maplocationmodel.cpp | ||
maplocationmodel.h | ||
messagehandlermodel.cpp | ||
messagehandlermodel.h | ||
models.cpp | ||
models.h | ||
ssrfsortfilterproxymodel.cpp | ||
ssrfsortfilterproxymodel.h | ||
tankinfomodel.cpp | ||
tankinfomodel.h | ||
treemodel.cpp | ||
treemodel.h | ||
weightmodel.cpp | ||
weightmodel.h | ||
weightsysteminfomodel.cpp | ||
weightsysteminfomodel.h | ||
yearlystatisticsmodel.cpp | ||
yearlystatisticsmodel.h |