diff options
author | Anthony Towns <aj@erisian.com.au> | 2010-11-20 18:20:45 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2010-11-20 18:20:45 +1000 |
commit | 74cab8503b51ba6fb05a4d12a031c749e870b0ef (patch) | |
tree | 6439df31a4f28fc2c23081259b550d04ba6deeeb /ao-tools/altosui/AltosFlightUI.java | |
parent | 0ecf033110084f1a8be98282d7029dc14f70dab5 (diff) | |
parent | 9a99cabc1c34c657fc95246192ba6d330f5f22d3 (diff) |
Merge branch 'buttonbox' of git://git.gag.com/fw/altos into buttonbox
Diffstat (limited to 'ao-tools/altosui/AltosFlightUI.java')
-rw-r--r-- | ao-tools/altosui/AltosFlightUI.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ao-tools/altosui/AltosFlightUI.java b/ao-tools/altosui/AltosFlightUI.java index 21b41528..6db6c67b 100644 --- a/ao-tools/altosui/AltosFlightUI.java +++ b/ao-tools/altosui/AltosFlightUI.java @@ -131,6 +131,7 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay { } Container bag; + JComboBox channels; public AltosFlightUI(AltosVoice in_voice, AltosFlightReader in_reader, final int serial) { AltosPreferences.init(this); @@ -151,10 +152,10 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay { if (serial >= 0) { // Channel menu - JComboBox channels = new AltosChannelMenu(AltosPreferences.channel(serial)); + channels = new AltosChannelMenu(AltosPreferences.channel(serial)); channels.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - int channel = Integer.parseInt(e.getActionCommand()); + int channel = channels.getSelectedIndex(); reader.set_channel(channel); AltosPreferences.set_channel(serial, channel); } |