From: Linus Torvalds Date: Thu, 20 Oct 2011 19:30:44 +0000 (+0300) Subject: Merge branch 'guifixes' of git://github.com/dirkhh/subsurface X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=312eaed464f9a569575c36226b77c9299d3bf38a;hp=2d02ac402ac8086d946f8a815104b30142ec83e5;p=ext%2Fsubsurface.git Merge branch 'guifixes' of git://github.com/dirkhh/subsurface --- diff --git a/profile.c b/profile.c index 1069253..60b9ab9 100644 --- a/profile.c +++ b/profile.c @@ -508,7 +508,7 @@ static void plot_cylinder_pressure(struct graphics_context *gc, struct plot_info if (entry->same_cylinder) line_to(gc, entry->sec, mbar); else - move_to(gc, 0, pi->maxpressure); + move_to(gc, entry->sec, mbar); } /* if we have valid samples, we don't want to draw a line to the minpressure * but just end wherever the dive ended (think valve shutdowns during dive) @@ -719,6 +719,8 @@ static struct plot_info *create_plot_info(struct dive *dive) entry->same_cylinder = sample->cylinderindex == cylinderindex; cylinderindex = sample->cylinderindex; entry->pressure = sample->cylinderpressure.mbar; + if (!entry->same_cylinder && !entry->pressure) + entry->pressure = dive->cylinder[cylinderindex].start.mbar; entry->temperature = sample->temperature.mkelvin; if (depth || lastdepth)