altoslib, altosuilib, altosui, telegps: Missing config values now MISSING
[fw/altos] / altosuilib / AltosUIRateList.java
index 8919804e760e6d1c0f3442ec9e0ee9ac838ec840..7bdd3f779b6fe8b3a3c814b25b500f1ab457e1b6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,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) {