changeset 2676:6af95cecdd03

More stable waterlinefacet, in prep for fix issue620. flys-artifacts/trunk@4374 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 10 May 2012 09:00:17 +0000
parents 1d7231d5b8ad
children 57d6670ddda3
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed May 09 20:07:58 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu May 10 09:00:17 2012 +0000
@@ -1,3 +1,10 @@
+2012-05-10  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	Preparations for fix issue620: Synchron navigation on non-existing km.
+
+	* src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java
+	  (getData): Return empty lines if no cross section found.
+
 2012-05-09  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
 	Display mittlere hoehe (which is not yet calculated).
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java	Wed May 09 20:07:58 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java	Thu May 10 09:00:17 2012 +0000
@@ -50,7 +50,13 @@
 
         WaterLineArtifact winfo = (WaterLineArtifact)artifact;
 
-        return winfo.getWaterLines(this.getIndex(), (FastCrossSectionLine) crossSection);
+        if (crossSection != null) {
+            return winfo.getWaterLines(this.getIndex(),
+                (FastCrossSectionLine) crossSection);
+        }
+        else {
+            return new Lines.LineData(new double[][] {}, 0d,0d);
+        }
     }
 
 

http://dive4elements.wald.intevation.org