altosi: callsign could not be configured for AltosUI
authorKeith Packard <keithp@keithp.com>
Sun, 20 Jan 2013 03:30:38 +0000 (19:30 -0800)
committerKeith Packard <keithp@keithp.com>
Sun, 20 Jan 2013 03:31:42 +0000 (19:31 -0800)
An extra local variable called callsign_value was hiding the object
field by the same name and preventing it from getting set to the right value

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosConfigureUI.java

index 0e411b03e4dfc7f87fc4641f40f9a86c1bfb18d2..392d71997d097c98c7999457e169f0c23d2c2836 100644 (file)
@@ -42,7 +42,7 @@ public class AltosConfigureUI
        }
 
        public void changedUpdate(DocumentEvent e) {
-               if (callsign_value != null) 
+               if (callsign_value != null)
                        AltosUIPreferences.set_callsign(callsign_value.getText());
        }
 
@@ -81,7 +81,7 @@ public class AltosConfigureUI
                /* Callsign setting */
                pane.add(new JLabel("Callsign"), constraints(0, 1));
 
-               JTextField callsign_value = new JTextField(AltosUIPreferences.callsign());
+               callsign_value = new JTextField(AltosUIPreferences.callsign());
                callsign_value.getDocument().addDocumentListener(this);
                callsign_value.setToolTipText("Callsign sent in packet mode");
                pane.add(callsign_value, constraints(1, 2, GridBagConstraints.BOTH));