mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Make sure cylinder related data is filled when dives are read
This is re-run every time we update the dive list model for the UI, but we should run it a first time right after loading the dives so that this data is correct even without the UI running - this way the data in headless standalone applications like the HTML exporter is correct as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b39e478c57
commit
b63b656c1f
1 changed files with 2 additions and 0 deletions
2
dive.c
2
dive.c
|
@ -8,6 +8,7 @@
|
|||
#include "dive.h"
|
||||
#include "libdivecomputer.h"
|
||||
#include "device.h"
|
||||
#include "divelist.h"
|
||||
|
||||
/* one could argue about the best place to have this variable -
|
||||
* it's used in the UI, but it seems to make the most sense to have it
|
||||
|
@ -1382,6 +1383,7 @@ struct dive *fixup_dive(struct dive *dive)
|
|||
if (same_rounded_pressure(cyl->sample_end, cyl->end))
|
||||
cyl->end.mbar = 0;
|
||||
}
|
||||
update_cylinder_related_info(dive);
|
||||
for (i = 0; i < MAX_WEIGHTSYSTEMS; i++) {
|
||||
weightsystem_t *ws = dive->weightsystem + i;
|
||||
add_weightsystem_description(ws);
|
||||
|
|
Loading…
Reference in a new issue