[Dive4elements-commits] [PATCH] FLYS: For Gauge Main Value view, avoid corner cases of gauge range

Wald Commits scm-commit at wald.intevation.org
Thu Feb 14 10:58:31 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1360836323 -3600
# Node ID eee722bc85dac349c0a249d5fcfecf9430d43012
# Parent  e2053fbcd165ccf07f8c8dc44d8873f79e665c23
FLYS: For Gauge Main Value view, avoid corner cases of gauge range.

diff -r e2053fbcd165 -r eee722bc85da flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java	Thu Feb 14 10:50:08 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java	Thu Feb 14 11:05:23 2013 +0100
@@ -441,8 +441,11 @@
     /** Opens a window with Main Values from gauge. */
     public void newGaugeMainValueTable(GaugeInfo gauge) {
         Window mainValueView = new Window();
+
+        // Take middle to avoid issues at borders.
+        double km = (gauge.getKmEnd() + gauge.getKmStart())/2d;
         mainValueView.addItem(new WQAutoTabSet(gauge.getRiverName(),
-            new double[] {gauge.getKmStart(), gauge.getKmEnd()}));
+            new double[] {km, km}));
         mainValueView.setWidth(1010);
         mainValueView.setHeight(700);
 


More information about the Dive4elements-commits mailing list