]> git.tdb.fi Git - ext/subsurface.git/blobdiff - profile.c
Add quick hack for "no sample pressure but tank index changed" case
[ext/subsurface.git] / profile.c
index e5c7238a6b0fc683bccd19372aed88b4e822472c..60b9ab9d9df85dd8cb99db3b33193a5bc9f07ae7 100644 (file)
--- a/profile.c
+++ b/profile.c
@@ -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)