X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosUIRateList.java;h=1717fb69b98934a5e4ed4588747926f497e9689f;hp=8407f31d9b55cd97bf39f3285c7af571e0d413de;hb=48e221cca00c9f925ff57588dd782842705f7a23;hpb=7041c386cdf37716f8daf0bc1a9204db620e3de9 diff --git a/altosuilib/AltosUIRateList.java b/altosuilib/AltosUIRateList.java index 8407f31d..1717fb69 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_9; +package org.altusmetrum.altosuilib_13; import javax.swing.*; -import org.altusmetrum.altoslib_9.*; +import org.altusmetrum.altoslib_13.*; public class AltosUIRateList extends JComboBox { @@ -26,10 +27,9 @@ public class AltosUIRateList extends JComboBox { 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) {