subsurface/commands
Michael Keller 10fc3bfd47 Bugfix: Fix Incorrect Volumes Displayed for Tank Types.
Fix an issue introduced in #4148.
Essentially the refactoring missed the fact that in the imperial system
tank size is tracked as the free gas volume, but in the metric system
(which is the one used in most of Subsurface's calculations) tank size
is tracked as water capacity.
So when updating a tank template tracking imperial measurements, the
given (metric) volume in l has to be multiplied by the working pressure,
and vice versa.
This also combines all the logic dealing with `tank_info` data in one
place, hopefully making it less likely that this will be broken by
inconsistencies in the future.

Fixes #4239.

Signed-off-by: Michael Keller <github@ike.ch>
2024-06-09 11:15:59 +02:00
..
CMakeLists.txt
command.cpp undo: pass divecomputer number to EditProfile command 2023-04-16 20:23:59 +02:00
command.h Desktop: Fix Gas Editing for Manually Added Dives. 2024-06-01 23:22:40 +12:00
command_base.cpp core: introduce divelog structure 2023-04-14 21:20:23 +02:00
command_base.h core: make owning pointers a top-level features 2023-04-16 20:23:59 +02:00
command_device.cpp core: introduce divelog structure 2023-04-14 21:20:23 +02:00
command_device.h undo/device: adjust device management infrastructure 2021-08-18 13:22:02 -07:00
command_divelist.cpp import: fix memory leak when importing dives 2024-05-27 20:11:37 +12:00
command_divelist.h core: port filterpreset.cpp to std::string 2024-03-10 11:01:42 +13:00
command_divesite.cpp core: introduce divelog structure 2023-04-14 21:20:23 +02:00
command_divesite.h mobile: remove GpsLocation 2021-09-13 11:21:34 -07:00
command_edit.cpp Bugfix: Fix Incorrect Volumes Displayed for Tank Types. 2024-06-09 11:15:59 +02:00
command_edit.h undo: pass divecomputer number to EditProfile command 2023-04-16 20:23:59 +02:00
command_edit_trip.cpp selection: trickle down trip selection 2023-04-16 20:23:59 +02:00
command_edit_trip.h selection: trickle down trip selection 2023-04-16 20:23:59 +02:00
command_event.cpp selection: move current dive and divecomputer to selection.cpp 2023-04-16 20:23:59 +02:00
command_event.h undo: set dive mode to CCR in undo command, not profile code 2021-01-11 09:31:36 -08:00
command_filter.cpp core: port filterpreset.cpp to std::string 2024-03-10 11:01:42 +13:00
command_filter.h core: port filterpreset.cpp to std::string 2024-03-10 11:01:42 +13:00
command_pictures.cpp cleanup: replace fprintf to stderr by report_info() 2024-04-23 07:47:11 +07:00
command_pictures.h