changeset 7257:88b70c788b0f

Minor code simplification.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 08 Oct 2013 09:00:45 +0200
parents b8d6aac3acf2
children 0e6b399e72f9
files artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java	Mon Oct 07 11:13:40 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java	Tue Oct 08 09:00:45 2013 +0200
@@ -401,8 +401,6 @@
 
             double gaugeDatum = getCurrentGaugeDatum();
 
-            double factor = (gaugeDatum == 0d) ? 1d : 100d;
-
             if (gaugeDatum == 0d) {
                 addAxisSeries(series, YAXIS.W.idx, visible);
             }
@@ -417,7 +415,7 @@
                 addAxisSeries(series2, YAXIS.W.idx, false);
                 // Use second axis at cm if at gauge.
                 for (int i = 0; i < series.getItemCount(); i++) {
-                    series.updateByIndex(i, new Double(factor*(series.getY(i).doubleValue()-gaugeDatum)));
+                    series.updateByIndex(i, new Double(100d*(series.getY(i).doubleValue()-gaugeDatum)));
                 }
                 addAxisSeries(series, YAXIS.WCm.idx, visible);
             }

http://dive4elements.wald.intevation.org