[Dive4elements-commits] [PATCH 3 of 4] Adjust label of second y axis to show cm if it is the "cm" axis

Wald Commits scm-commit at wald.intevation.org
Wed Jun 26 17:08:15 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1372257987 -7200
# Node ID 49760b45d4dfa9fdc211fbf878c91f7ad5841339
# Parent  192fbd23d97fbd7b368b404a2153a2148b00a1f8
Adjust label of second y axis to show cm if it is the "cm" axis.

diff -r 192fbd23d97f -r 49760b45d4df artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java	Wed Jun 26 16:45:43 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java	Wed Jun 26 16:46:27 2013 +0200
@@ -96,6 +96,8 @@
         D4EArtifact flys = (D4EArtifact) master;
 
         String unit = RiverUtils.getRiver(flys).getWstUnit().getName();
+        if (pos == 1 && getCurrentGaugeDatum() != 0)
+            unit = "cm";
 
         return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT, new Object[] { unit });
     }


More information about the Dive4elements-commits mailing list