mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add maxdepth back to the dive structure
Populate during dive fixup as the maximum depth shown by all the divecomputers. Use this value (instead of the one in the first divecomputer) in printing, statistics, etc. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b8c7992bbf
commit
1511271201
6 changed files with 19 additions and 17 deletions
4
print.c
4
print.c
|
@ -97,7 +97,7 @@ static void show_dive_header(struct dive *dive, cairo_t *cr, double w,
|
|||
people = "";
|
||||
}
|
||||
|
||||
depth = get_depth_units(dive->dc.maxdepth.mm, &decimals, &unit);
|
||||
depth = get_depth_units(dive->maxdepth.mm, &decimals, &unit);
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
_("Max depth: %.*f %s\nDuration: %d min\n%s"),
|
||||
decimals, depth, unit,
|
||||
|
@ -585,7 +585,7 @@ static void show_dive_table(struct dive *dive, cairo_t *cr, double w,
|
|||
curwidth = curwidth + colwidth;
|
||||
|
||||
// Col 3: Depth
|
||||
depth = get_depth_units(dive->dc.maxdepth.mm, &decimals, &unit);
|
||||
depth = get_depth_units(dive->maxdepth.mm, &decimals, &unit);
|
||||
len = snprintf(buffer, sizeof(buffer),
|
||||
"%.*f %s", decimals, depth, unit);
|
||||
cairo_move_to(cr, curwidth / PANGO_SCALE, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue