summaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-08 20:44:04 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-08 20:44:04 -0800
commit15112712019817e4e64b5c35b7bb38315125e920 (patch)
treed09295d8284cb8978815d6b38784341fee636e10 /print.c
parentb8c7992bbfe03dce665cbd5ba6144b0c8b59b6fd (diff)
downloadsubsurface-15112712019817e4e64b5c35b7bb38315125e920.tar.gz
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>
Diffstat (limited to 'print.c')
-rw-r--r--print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print.c b/print.c
index 7ddb5b9b2..928fbb4d4 100644
--- a/print.c
+++ b/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);