[PATCH 7 of 9] Fix applying the inversion of diagrams

Wald Commits scm-commit at wald.intevation.org
Tue Sep 24 11:44:04 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1380015643 -7200
# Branch generator-refactoring
# Node ID 7b88b87958ac5c212210ca71965f9e9fdfd37396
# Parent  9b47381e5fd7fa120e33eb9cce1c810a975ee263
Fix applying the inversion of diagrams.

diff -r 9b47381e5fd7 -r 7b88b87958ac artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Tue Sep 24 11:38:07 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Tue Sep 24 11:40:43 2013 +0200
@@ -857,8 +857,8 @@
         xaxis.setLabelFont(labelFont);
         xaxis.setTickLabelFont(labelFont);
 
-        if (isInverted()) {
-            logger.debug("X-Axis.setInverted(true)");
+        logger.debug("Adjusting xAxis. Inverted?: " + inverted);
+        if (inverted) {
             xaxis.setInverted(true);
         }
     }
@@ -964,8 +964,11 @@
 
     /** Set to true if x axis should be inverted.
      * This can not be set to false afterwards. */
-    public void setInverted(boolean inverted) {
-        this.inverted = inverted;
+    public void setInverted(boolean value) {
+        /* One request to invert dominates. */
+        if (!inverted) {
+            inverted = value;
+        }
     }
 
     @Override


More information about the Dive4elements-commits mailing list