mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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 <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5430eec99d
commit
12a60cf9e6
1 changed files with 18 additions and 0 deletions
|
@ -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, "<divelog><divesites><site uuid='%8x' name='", dive->dive_site_uuid);
|
||||
put_quoted(&mb, ds->name, 1, 0);
|
||||
put_format(&mb, "'");
|
||||
if (ds->latitude.udeg || ds->longitude.udeg) {
|
||||
put_degrees(&mb, ds->latitude, " gps='", " ");
|
||||
put_degrees(&mb, ds->longitude, "", "'");
|
||||
}
|
||||
put_format(&mb, "/>\n</divesites>\n");
|
||||
}
|
||||
|
||||
save_one_dive_to_mb(&mb, dive);
|
||||
|
||||
if (ds) {
|
||||
put_format(&mb, "</divelog>\n");
|
||||
}
|
||||
membuf = mb_cstring(&mb);
|
||||
streamsize = strlen(membuf);
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue