diff options
author | Keith Packard <keithp@keithp.com> | 2017-06-11 16:11:09 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-06-11 22:54:22 -0700 |
commit | 171adbe7db8520f5ff52a5fe2c54fe165c6f91f8 (patch) | |
tree | d873249bca5f9beb0413475d3aad6f5d4a4d04cd /altosuilib | |
parent | af6ce9a142d001f3b9b83cf6527f4dc848e94d48 (diff) |
altoslib, altosuilib, altosui, telegps: Missing config values now MISSING
Config values that didn't apply to the current product used to get set
to -1, but now they're set to AltosLib.MISSING to be consistent with
the rest of the code. Deal with this in the UI bits.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosuilib')
-rw-r--r-- | altosuilib/AltosUIRateList.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/altosuilib/AltosUIRateList.java b/altosuilib/AltosUIRateList.java index 187977d3..7bdd3f77 100644 --- a/altosuilib/AltosUIRateList.java +++ b/altosuilib/AltosUIRateList.java @@ -27,10 +27,9 @@ public class AltosUIRateList extends JComboBox<String> { int serial; public void set_rate(int new_rate) { - int i; - - setVisible(new_rate >= 0); - setSelectedIndex(new_rate); + if (new_rate != AltosLib.MISSING) + setSelectedIndex(new_rate); + setVisible(new_rate != AltosLib.MISSING); } public void set_product(String new_product) { |