summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-05 20:59:25 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-06 06:46:14 +0100
commit1218e7a5e9fc094b6da7e3dde3d3b8578ee6bfab (patch)
treec7e4103420d59375f016fea0242920d661a00005 /profile.c
parentaf939ee4c882ed08bd5a3f7a72bb5698deb36630 (diff)
downloadsubsurface-1218e7a5e9fc094b6da7e3dde3d3b8578ee6bfab.tar.gz
Don't print mean depth across the whole profile area
I can't remember why we initially did this instead of ending the horizontal red line whith the last data point of the pressure profile. But especially nuw with more graphs shown the one line that extends past the end of the dive looked really silly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/profile.c b/profile.c
index faed6c0d3..65f1dab93 100644
--- a/profile.c
+++ b/profile.c
@@ -871,16 +871,16 @@ static void plot_depth_profile(struct graphics_context *gc, struct plot_info *pi
}
cairo_stroke(cr);
+ gc->leftx = 0; gc->rightx = maxtime;
+
/* Show mean depth */
if (! gc->printer) {
set_source_rgba(gc, MEAN_DEPTH);
move_to(gc, 0, pi->meandepth);
- line_to(gc, 1, pi->meandepth);
+ line_to(gc, pi->entry[pi->nr - 1].sec, pi->meandepth);
cairo_stroke(cr);
}
- gc->leftx = 0; gc->rightx = maxtime;
-
/*
* These are good for debugging text placement etc,
* but not for actual display..