X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosuilib%2FAltosUIRateList.java;h=0e36e833f2c7f65ecdf690026aab4584bf2c9cf6;hp=5a18b32fe4effae2db52fdbf0232ba823898c51e;hb=76b288f8d02e0a48f04de9455a2dd0b77e48bd63;hpb=21d176f161b90f18f236ef887cef9676d712eee3 diff --git a/altosuilib/AltosUIRateList.java b/altosuilib/AltosUIRateList.java index 5a18b32f..0e36e833 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_10; +package org.altusmetrum.altosuilib_14; import javax.swing.*; -import org.altusmetrum.altoslib_10.*; +import org.altusmetrum.altoslib_14.*; 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) {