diff flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java @ 588:809756dda091

#132 Set the initial mode of the location/distance panel to 'distance'. flys-client/trunk@2183 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 21 Jun 2011 16:41:09 +0000
parents 78907f0fb939
children ba1b27b7d282
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java	Tue Jun 21 16:22:39 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java	Tue Jun 21 16:41:09 2011 +0000
@@ -504,7 +504,7 @@
         String mDefValue = mDef != null ? mDef.getStringValue() : null;
         String theMode = mDefValue != null && mDefValue.length() > 0
             ? mDef.getStringValue()
-            : FIELD_VALUE_LOCATION;
+            : FIELD_VALUE_DISTANCE;
 
         mode.setValue(FIELD_MODE, theMode);
 
@@ -533,6 +533,7 @@
 
         if (theMode.equals(FIELD_VALUE_DISTANCE)) {
             enableDistancePanel();
+            inputTables.selectTab(1);
         }
     }
 
@@ -1003,7 +1004,7 @@
         values.put(FIELD_VALUE_DISTANCE, MESSAGES.distance());
 
         LinkedHashMap initial = new LinkedHashMap();
-        initial.put(FIELD_MODE, FIELD_VALUE_LOCATION);
+        initial.put(FIELD_MODE, FIELD_VALUE_DISTANCE);
 
         radio.setValueMap(values);
         radio.addChangeHandler(this);

http://dive4elements.wald.intevation.org