summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-11-02 18:35:39 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-06 09:21:16 -0800
commitffc8e0a6615ae7cdd27cb9d36a9f08a493b110ec (patch)
treea4bd53882608ce918bfc2fcd436b72bc4749a23e
parent3555361e4426a30c79aba5ff2dc7100ea852d325 (diff)
downloadsubsurface-ffc8e0a6615ae7cdd27cb9d36a9f08a493b110ec.tar.gz
Grab all gas mixes only when no tank data is given
Grabbing all gas mixes was added for Xdeep default cylinders, and it is not required for other data sources that have tankdata info in the UDDF file. See #958 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--xslt/uddf.xslt5
1 files changed, 4 insertions, 1 deletions
diff --git a/xslt/uddf.xslt b/xslt/uddf.xslt
index e15c27e01..d37bf6795 100644
--- a/xslt/uddf.xslt
+++ b/xslt/uddf.xslt
@@ -60,6 +60,9 @@
</xsl:template>
<xsl:template match="dive|u:dive|u1:dive">
+ <xsl:variable name="tankdata">
+ <xsl:value-of select="count(//tankdata|//u:tankdata|//u1:tankdata)"/>
+ </xsl:variable>
<dive>
<!-- Count the amount of temeprature samples during the dive -->
<xsl:variable name="temperatureSamples">
@@ -278,7 +281,7 @@
</xsl:for-each>
</xsl:if>
- <xsl:if test="/uddf/gasdefinitions != ''">
+ <xsl:if test="/uddf/gasdefinitions != '' and $tankdata = 0">
<xsl:for-each select="/uddf/gasdefinitions/mix">
<cylinder description="unknown">
<xsl:attribute name="o2">