projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Fix channel changing in flight UI to actually work
[fw/altos]
/
ao-tools
/
altosui
/
AltosFlightUI.java
diff --git
a/ao-tools/altosui/AltosFlightUI.java
b/ao-tools/altosui/AltosFlightUI.java
index 56ab7ebc4ac01546d210b8446cb7c010d5816f9b..ac88aa152ba661467e4dac8447e71953d0ce259f 100644
(file)
--- a/
ao-tools/altosui/AltosFlightUI.java
+++ b/
ao-tools/altosui/AltosFlightUI.java
@@
-127,6
+127,7
@@
public class AltosFlightUI extends JFrame implements AltosFlightDisplay {
}
Container bag;
}
Container bag;
+ JComboBox channels;
public AltosFlightUI(AltosVoice in_voice, AltosFlightReader in_reader, final int serial) {
AltosPreferences.init(this);
public AltosFlightUI(AltosVoice in_voice, AltosFlightReader in_reader, final int serial) {
AltosPreferences.init(this);
@@
-147,10
+148,10
@@
public class AltosFlightUI extends JFrame implements AltosFlightDisplay {
if (serial >= 0) {
// Channel menu
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) {
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);
}
reader.set_channel(channel);
AltosPreferences.set_channel(serial, channel);
}