[PATCH 1 of 2] Fix Waterlevel description for issue1404

Wald Commits scm-commit at wald.intevation.org
Tue Jul 23 09:49:24 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1374507641 -7200
# Node ID b1e66ea7fc2b0587892285ec5c0596c5b26c6156
# Parent  0e1f142af3972ae04dfb63661219b40c04242d15
Fix Waterlevel description for issue1404

    There might be a case for the wq_single description instead of
    getValueFromWQ but this works for a single W value and multiple
    W values and was the code formerly used for PDF export.

diff -r 0e1f142af397 -r b1e66ea7fc2b artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Mon Jul 22 11:18:26 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Mon Jul 22 17:40:41 2013 +0200
@@ -637,7 +637,9 @@
                 colDesc = RiverUtils.getNamedMainValue(winfo, wqkms.getRawValue());
                 // For 'W am Pegel' s
                 if (colDesc == null) {
-                    colDesc = ((D4EArtifact)master).getDataAsString("wq_single");
+                    Double value = RiverUtils.getValueFromWQ(wqkms);
+                    colDesc = (value != null) ?
+                        Formatter.getWaterlevelW(context).format(value) : null;
                 }
             }
         }


More information about the Dive4elements-commits mailing list