summaryrefslogtreecommitdiffstats
path: root/core/save-git.c
diff options
context:
space:
mode:
authorGravatar willemferguson <willemferguson@zoology.up.ac.za>2019-04-30 12:42:33 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-05-15 07:37:14 -0700
commit1bdf00b2b472078a0b24f1c269782d822cb96e02 (patch)
tree13a5e784118d9abb0a1bc1dfa9cbe4a9f457de80 /core/save-git.c
parentca6aa3813956b5e8be68b86ed36a5786b3ee746f (diff)
downloadsubsurface-1bdf00b2b472078a0b24f1c269782d822cb96e02.tar.gz
Convert the atmospheric pressure in the Information Tab to an editable field
The Information tab shows the atmospheric pressure. Make this value editable and also ensure that changes to it are undo-able. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Diffstat (limited to 'core/save-git.c')
-rw-r--r--core/save-git.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/save-git.c b/core/save-git.c
index b13921c60..a5f6f0dde 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -425,10 +425,13 @@ static void save_dc(struct membuffer *b, struct dive *dive, struct divecomputer
*/
static void create_dive_buffer(struct dive *dive, struct membuffer *b)
{
+ pressure_t surface_pressure = un_fixup_surface_pressure(dive);
if (dive->dc.duration.seconds > 0)
put_format(b, "duration %u:%02u min\n", FRACTION(dive->dc.duration.seconds, 60));
SAVE("rating", rating);
SAVE("visibility", visibility);
+ if (surface_pressure.mbar)
+ SAVE("airpressure", surface_pressure.mbar);
cond_put_format(dive->notrip, b, "notrip\n");
save_tags(b, dive->tag_list);
if (dive->dive_site)