changeset 1665:0ebce697adcc

Fix flys/issue334 (CrossSection output shown even without calculation result). flys-artifacts/trunk@2870 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 30 Sep 2011 09:41:22 +0000
parents 71d5abde92f2
children 09c1292cf36d
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java
diffstat 2 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Sep 30 08:02:21 2011 +0000
+++ b/flys-artifacts/ChangeLog	Fri Sep 30 09:41:22 2011 +0000
@@ -1,3 +1,11 @@
+2011-09-30  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	flys/issue334 (Querprofil-Diagramm: Ausgabe dieses Diagrammtyps
+	möglich, obwohl WSP Berechnung keine Ergebnisse liefert)
+
+	* src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java:
+	  (compute): Add Facets regarding CrossSections only if data available.
+
 2011-09-29  Ingo Weinzierl <ingo@intevation.de>
 
 	flys/issue176 (Diagramm: Benennung eines Abflusses bei gewählter Höhe am Pegel)
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java	Fri Sep 30 08:02:21 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java	Fri Sep 30 09:41:22 2011 +0000
@@ -82,16 +82,18 @@
 
             facets.add(wst);
             facets.add(csv);
+            // Also register the CrossSectionFacet (added to respective out).
+            facets.add(new CrossSectionFacet(winfo.getCrossSectionName()));
+            // Assume to be in wq_single mode.
+            // TODO: Use createWTitle for label.
+            facets.add(new CrossSectionWaterLineFacet("Q=" +
+                winfo.getDataAsString("wq_single")));
         }
 
         if (res.getReport().hasProblems()) {
             facets.add(new ReportFacet(ComputeType.ADVANCE, hash, id));
         }
 
-        // Also register the CrossSectionFacet (added to respective out).
-        facets.add(new CrossSectionFacet(winfo.getCrossSectionName()));
-        // Assume to be in wq_single mode.
-        facets.add(new CrossSectionWaterLineFacet("Q=" + winfo.getDataAsString("wq_single")));
         return res;
     }
 

http://dive4elements.wald.intevation.org