mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
2fa66f7ab1
This is really unrelated to my recent "multiple gas pressures" work, but the test case from Gaetan Bisson showed that the logic for which cylinders to show in the equipment tab was less than optimal. We basically used to show only cylinders that were actively used, unless you had the "display_unused_tanks" preference option set. That comes from some dive computers reporting a *lot* of cylinders that the diver really doesn't even have with him on the dive. And showing those extra dummy cylinders gets pretty annoying after a time, which is why we default to not showing unused tanks. However, in Gaetan's case, he had a total of four cylinders on the dive: the O2 and diluent bottle for the rebreather dive, and then bailout bottles (both air and deco). And while the bailout bottles weren't actually used, Gaetan had actually filled in all the pressure details etc for them, and so you'd really expect them to show up. These were *not* just some extraneous default cylinder filled in by an over-eager dive computer. But because the bailout wasn't used, the manual pressures at the end were the same as at the beginning, and the "unused cylinder" logic triggered anyway. So tweak the logic a bit, and say that you show cylinder equipment not only if it has been used on the dive, but also if it has any pressure information for it. So the o nly cylinders we don't show are the ones that really have no interesting information at all, except for possibly the cylinder tank type itself (which is exactly what the over-eager dive computer case might fill in, usually in the form of a default cylinder type). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org> |
||
---|---|---|
.. | ||
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 | ||
divesitepicturesmodel.cpp | ||
divesitepicturesmodel.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 | ||
weigthsysteminfomodel.cpp | ||
weigthsysteminfomodel.h | ||
yearlystatisticsmodel.cpp | ||
yearlystatisticsmodel.h |