changeset 1696:56953439dcae

Fixed incorrect indexing of facets when doing multiple (w)differences. flys-artifacts/trunk@2925 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 10 Oct 2011 11:40:17 +0000
parents 0c9f7cc2cc11
children 2a6baa9e1576
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WDifferencesState.java
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon Oct 10 10:27:45 2011 +0000
+++ b/flys-artifacts/ChangeLog	Mon Oct 10 11:40:17 2011 +0000
@@ -1,3 +1,12 @@
+2011-10-10  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	Fix WDifferences with more than one Pair (crashed due to incorrect index for
+	facets.)
+
+	* src/main/java/de/intevation/flys/artifacts/states/WDifferencesState.java:
+	  Fix wrong index for difference facets (allows for more than one
+	  difference facet per artifact without crashes).
+
 2011-10-10  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WDifferencesState.java	Mon Oct 10 10:27:45 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WDifferencesState.java	Mon Oct 10 11:40:17 2011 +0000
@@ -140,7 +140,7 @@
             }
     
             if (facets != null) {
-                facets.add(new DifferenceCurveFacet(i, W_DIFFERENCES, facetName,
+                facets.add(new DifferenceCurveFacet(i/2, W_DIFFERENCES, facetName,
                     ComputeType.ADVANCE, id, hash));
                 facets.add(new DataFacet(CSV, "CSV data"));
             }

http://dive4elements.wald.intevation.org