X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosuilib%2FAltosUIRateList.java;h=d1c15ce0d44fa2994ace90cc532d2097915bcb5e;hb=c2d9f13a97d45b7dbe2cb47b563aea59ec725bb1;hp=2e0c65a22a0baa147543be0c938ef9741ba02667;hpb=efb86669b5a74f244e2218f3385db633c36208af;p=fw%2Faltos diff --git a/altosuilib/AltosUIRateList.java b/altosuilib/AltosUIRateList.java index 2e0c65a2..d1c15ce0 100644 --- a/altosuilib/AltosUIRateList.java +++ b/altosuilib/AltosUIRateList.java @@ -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 @@ -15,10 +16,10 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_3; +package org.altusmetrum.altosuilib_12; import javax.swing.*; -import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altoslib_12.*; public class AltosUIRateList extends JComboBox { @@ -26,14 +27,9 @@ public class AltosUIRateList extends JComboBox { int serial; public void set_rate(int new_rate) { - int i; - - if (new_rate < 0) { - setVisible(false); - return; - } - - setSelectedIndex(new_rate); + if (new_rate != AltosLib.MISSING) + setSelectedIndex(new_rate); + setVisible(new_rate != AltosLib.MISSING); } public void set_product(String new_product) {