[PATCH] (issue1782) Invert KM filter if from is larger then to

Wald Commits scm-commit at wald.intevation.org
Tue Dec 16 15:40:14 CET 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1418740800 -3600
# Node ID 5160d5f9c65d3eb44cde394784f7dc259a9edb49
# Parent  7d0c4e5088353de03d710e7f8c8312dc5fa92f5e
(issue1782) Invert KM filter if from is larger then to

diff -r 7d0c4e508835 -r 5160d5f9c65d artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Tue Dec 16 15:29:44 2014 +0100
+++ b/artifacts/doc/conf/meta-data.xml	Tue Dec 16 15:40:00 2014 +0100
@@ -3197,6 +3197,11 @@
     <dc:macro name="artifact-range">
       <dc:variable name="fromkm" type="number" expr="dc:fromValue(dc:get('ld_mode'), dc:get('ld_locations'), dc:get('ld_from'))"/>
       <dc:variable name="tokm" type="number" expr="dc:toValue(dc:get('ld_mode'), dc:get('ld_locations'), dc:get('ld_to'))"/>
+      <dc:if test="$fromkm > $tokm">
+        <dc:message>Inverting KM filter.</dc:message>
+        <dc:variable name="fromkm" type="number" expr="dc:toValue(dc:get('ld_mode'), dc:get('ld_locations'), dc:get('ld_to'))"/>
+        <dc:variable name="tokm" type="number" expr="dc:fromValue(dc:get('ld_mode'), dc:get('ld_locations'), dc:get('ld_from'))"/>
+      </dc:if>
       <dc:macro-body/>
     </dc:macro>
 


More information about the Dive4Elements-commits mailing list