subsurface/desktop-widgets/tab-widgets
Berthold Stoeger a40b40ae7a cylinders: only hide cylinders at the end of the list
On the equipment tab, unused cylinders (automatically added,
no pressure data) could be hidden. This was implemented using
a QSortFilterProxyModel.

Apparently, it causes confusion if cylinders in the middle of
the list are hidden. Therefore, only hide cylinders at the end
of the list.

QSortFilterProxyModel seems the wrong tool for that job, so
remove it and add a flag "hideUnused" to the base model. Calculate
the number of cylinders when changing the dive.

This is rather complex, because the same model is used for
the planner (which doesn't hide cylinders) and the equipment
tab (which does). Of course, syncing core and model now becomes
harder. For instance, the caching of the number of rows was removed
in a37939889b and now has to be
readded.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-12-13 11:54:24 -08:00
..
maintab.cpp Remove the divecomputer naming tab 2021-08-18 13:22:02 -07:00
maintab.h
maintab.ui
TabBase.cpp
TabBase.h
TabDiveEquipment.cpp cylinders: only hide cylinders at the end of the list 2021-12-13 11:54:24 -08:00
TabDiveEquipment.h cylinders: only hide cylinders at the end of the list 2021-12-13 11:54:24 -08:00
TabDiveEquipment.ui
TabDiveExtraInfo.cpp
TabDiveExtraInfo.h
TabDiveExtraInfo.ui
TabDiveInformation.cpp Don't attempt to compute SAC for CCR dives 2021-11-24 11:03:51 -08:00
TabDiveInformation.h
TabDiveInformation.ui
TabDivePhotos.cpp cleanup: replace membuffer by membufferpp in C-code 2021-07-23 11:22:43 -07:00
TabDivePhotos.h
TabDivePhotos.ui
TabDiveSite.cpp
TabDiveSite.h
TabDiveSite.ui
TabDiveStatistics.cpp desktop: fix div-by-zero when selecting multiple invalid dives 2021-10-11 20:53:41 +03:00
TabDiveStatistics.h
TabDiveStatistics.ui