From 12a60cf9e63450228090592fae3c99069f131ae6 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 6 Sep 2015 21:40:15 +0300 Subject: Include dive site on divelogs export Due to the new dive site management, we need to include this information before transforming the XML to divelogs.de format. Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- qt-ui/subsurfacewebservices.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 128e199c3..1722da4ce 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -192,7 +192,25 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile, continue; /* make sure the buffer is empty and add the dive */ mb.len = 0; + + struct dive_site *ds = get_dive_site_by_uuid(dive->dive_site_uuid); + + if (ds) { + put_format(&mb, "latitude.udeg || ds->longitude.udeg) { + put_degrees(&mb, ds->latitude, " gps='", " "); + put_degrees(&mb, ds->longitude, "", "'"); + } + put_format(&mb, "/>\n\n"); + } + save_one_dive_to_mb(&mb, dive); + + if (ds) { + put_format(&mb, "\n"); + } membuf = mb_cstring(&mb); streamsize = strlen(membuf); /* -- cgit v1.2.3-70-g09d2