mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Equipment: Include Unused Tanks in Merge if Preference is Enabled.
Include unused tanks in merges of multiple logs into a single dive if the 'Show unused cylinders' preference is enabled. Also rename the preference (in code) to `include_unused_tanks` to reflect the fact that it is already used in more places than just the display (exporting, cloning dives). Simplified the cylinder model to make forced inclusion of unused tanks dependent on use of the model in planner. Leaving the persisted name of the preference as `display_unused_tanks` to avoid resetting this for all users - is there a good way to migrate preference names? Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
cb6f768865
commit
5fae7ce7a0
17 changed files with 50 additions and 47 deletions
|
@ -213,7 +213,7 @@ void export_TeX(const char *filename, bool selected_only, bool plain, ExportCall
|
|||
qty_cyl = 0;
|
||||
for (i = 0; i < dive->cylinders.nr; i++){
|
||||
const cylinder_t &cyl = *get_cylinder(dive, i);
|
||||
if (is_cylinder_used(dive, i) || (prefs.display_unused_tanks && cyl.type.description)){
|
||||
if (is_cylinder_used(dive, i) || (prefs.include_unused_tanks && cyl.type.description)){
|
||||
put_format(&buf, "\\def\\%scyl%cdescription{%s}\n", ssrf, 'a' + i, cyl.type.description);
|
||||
put_format(&buf, "\\def\\%scyl%cgasname{%s}\n", ssrf, 'a' + i, gasname(cyl.gasmix));
|
||||
put_format(&buf, "\\def\\%scyl%cmixO2{%.1f\\%%}\n", ssrf, 'a' + i, get_o2(cyl.gasmix)/10.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue