[PATCH 1 of 3] (issue1733) Clearly set location distance defaults

Wald Commits scm-commit at wald.intevation.org
Mon Oct 27 14:37:20 CET 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1414409524 -3600
# Node ID 75b84f139c1b5f210b3a18bc36856692bbbeccea
# Parent  fe43340352bcaf6c5b028864042d93d5916c5b4e
(issue1733) Clearly set location distance defaults

    This fixes the default values for the distance panel.
    The data values were set in initDefaults after the ctor.

diff -r fe43340352bc -r 75b84f139c1b gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java	Fri Oct 24 16:31:22 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java	Mon Oct 27 12:32:04 2014 +0100
@@ -696,6 +696,8 @@
             inputTables.selectTab(1);
         }
         currentFiltered = (ListGrid)inputTables.getSelectedTab().getPane();
+
+        distancePanel.setValues(getFrom(), getTo(), getStep());
     }
 
 
@@ -704,16 +706,16 @@
         container            = new HLayout();
         Canvas checkboxPanel = createRadioButtonPanel();
 
-        // the initial view will display the location input mode
         locationPanel = new DoubleArrayPanel(
                 MESSAGES.unitLocation(),
                 getLocationValues(),
                 this);
+
         distancePanel = new DoubleRangePanel(
-            MESSAGES.unitFrom(), MESSAGES.unitTo(), MESSAGES.unitWidth(),
-            getFrom(), getTo(), getStep(),
-            400,
-            this);
+                MESSAGES.unitFrom(), MESSAGES.unitTo(), MESSAGES.unitWidth(),
+                0, 0, 0, /* initDefaults set the default values for this. */
+                400,
+                this);
 
         container.addMember(locationPanel);
         container.addMember(distancePanel);


More information about the Dive4Elements-commits mailing list