diff options
author | willemferguson <willemferguson@zoology.up.ac.za> | 2019-04-30 12:42:33 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-05-15 07:37:14 -0700 |
commit | 1bdf00b2b472078a0b24f1c269782d822cb96e02 (patch) | |
tree | 13a5e784118d9abb0a1bc1dfa9cbe4a9f457de80 /core/save-xml.c | |
parent | ca6aa3813956b5e8be68b86ed36a5786b3ee746f (diff) | |
download | subsurface-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-xml.c')
-rw-r--r-- | core/save-xml.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/save-xml.c b/core/save-xml.c index 02cb2bf87..f043ab6d8 100644 --- a/core/save-xml.c +++ b/core/save-xml.c @@ -473,6 +473,7 @@ static void save_picture(struct membuffer *b, struct picture *pic) void save_one_dive_to_mb(struct membuffer *b, struct dive *dive, bool anonymize) { struct divecomputer *dc; + pressure_t surface_pressure = un_fixup_surface_pressure(dive); put_string(b, "<dive"); if (dive->number) @@ -488,6 +489,8 @@ void save_one_dive_to_mb(struct membuffer *b, struct dive *dive, bool anonymize) put_format(b, " divesiteid='%8x'", dive->dive_site->uuid); } show_date(b, dive->when); + if (surface_pressure.mbar) + put_pressure(b, surface_pressure, " airpressure='", " bar'"); if (dive->dc.duration.seconds > 0) put_format(b, " duration='%u:%02u min'>\n", FRACTION(dive->dc.duration.seconds, 60)); |