[PATCH] Potential fix for flys/issue1717: Draw manuel points on W or Q axis depending on the calculation

Wald Commits scm-commit at wald.intevation.org
Mon May 26 17:00:33 CEST 2014


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1401116428 -7200
# Node ID a7b218447e128e41c9ff2e981ea2d233e6b696ea
# Parent  64930ceebac05ac312aaa95d8e22df079e542cd9
Potential fix for flys/issue1717: Draw manuel points on W or Q axis depending on the calculation.

diff -r 64930ceebac0 -r a7b218447e12 artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java	Mon May 26 12:40:19 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java	Mon May 26 17:00:28 2014 +0200
@@ -158,8 +158,14 @@
                 artifactFacet.getFacetDescription(), theme, visible);
         }
         else if (FacetTypes.IS.MANUALPOINTS(name)) {
+            HistoricalDischargeAccess.EvaluationMode mode =
+                new HistoricalDischargeAccess((D4EArtifact)getMaster()).getEvaluationMode();
+            int axis = mode == HistoricalDischargeAccess.EvaluationMode.W
+                ? YAXIS.Q.idx
+                : YAXIS.W.idx;
+
             doPoints(artifactFacet.getData(context), artifactFacet, theme,
-                visible, YAXIS.Q.idx);
+                visible, axis);
         }
         else {
             logger.warn("doOut(): unknown facet name: " + name);


More information about the Dive4Elements-commits mailing list