diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2021-07-17 10:21:26 +0300 |
---|---|---|
committer | mturkia <miika.turkia@gmail.com> | 2021-07-18 13:43:54 +0300 |
commit | 63795a84f4e54dc5cf1bfa1d685dea685f85d424 (patch) | |
tree | e91b730217c225fc59ac72e63abeac1078dfc5d1 /core | |
parent | 235ee4803f9ffc3108e1e00b51afeeb86e8d95a6 (diff) | |
download | subsurface-63795a84f4e54dc5cf1bfa1d685dea685f85d424.tar.gz |
Export unused cylinders to divelogs.de
When user has selected to show unused cylinders in equipment tab,
respect this setting when exporting to divelogs.de.
Fixes #3277
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/uploadDiveLogsDE.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/uploadDiveLogsDE.cpp b/core/uploadDiveLogsDE.cpp index 5b5bd8e91..a2914c406 100644 --- a/core/uploadDiveLogsDE.cpp +++ b/core/uploadDiveLogsDE.cpp @@ -11,6 +11,7 @@ #include "core/membuffer.h" #include "core/divesite.h" #include "core/cloudstorage.h" +#include "core/xmlparams.h" #ifndef SUBSURFACE_MOBILE #include "core/selection.h" #endif // SUBSURFACE_MOBILE @@ -97,6 +98,7 @@ bool uploadDiveLogsDE::prepareDives(const QString &tempfile, bool selected) xmlDoc *transformed; struct zip_source *s; struct membuffer mb = {}; + struct xml_params *params = alloc_xml_params(); /* * Get the i'th dive in XML format so we can process it. @@ -153,7 +155,9 @@ bool uploadDiveLogsDE::prepareDives(const QString &tempfile, bool selected) } free_buffer(&mb); - transformed = xsltApplyStylesheet(xslt, doc, NULL); + xml_params_add_int(params, "allcylinders", prefs.display_unused_tanks); + transformed = xsltApplyStylesheet(xslt, doc, xml_params_get(params)); + free_xml_params(params); if (!transformed) { qWarning() << errPrefix << "XSLT transform failed for dive: " << i; report_error(tr("Conversion of dive %1 to divelogs.de format failed").arg(i).toUtf8()); |