changeset 716:733d6db30722

Fix for flys/issue158 flys-artifacts/trunk@2186 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 21 Jun 2011 17:03:46 +0000
parents 9665d6a48f7b
children be4709640aac
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionExporter.java
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Jun 21 16:31:19 2011 +0000
+++ b/flys-artifacts/ChangeLog	Tue Jun 21 17:03:46 2011 +0000
@@ -1,3 +1,10 @@
+2011-06-21  Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+	Fix for flys/issue158
+
+	* src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionExporter.java:
+	  Checks for right class now.
+	
 2011-06-21  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	Fix for flys/issue154
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionExporter.java	Tue Jun 21 16:31:19 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionExporter.java	Tue Jun 21 17:03:46 2011 +0000
@@ -8,6 +8,7 @@
 
 import de.intevation.flys.artifacts.model.WQCKms;
 import de.intevation.flys.artifacts.model.WQKms;
+import de.intevation.flys.artifacts.model.CalculationResult;
 
 /**
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
@@ -39,9 +40,12 @@
 
     @Override
     protected void addData(Object d) {
-        if (d instanceof WQKms []) {
-            data.add((WQKms [])d);
-        }
+        if (d instanceof CalculationResult) {
+            d = ((CalculationResult)d).getData();
+            if (d instanceof WQKms []) {
+                data.add((WQKms [])d);
+            }
+        }        
     }
 
 

http://dive4elements.wald.intevation.org