fixed combobox listeners in initSettings()

This commit is contained in:
Niklas 2020-03-30 04:42:44 +02:00
parent 04017e8afe
commit 7389f2300b
2 changed files with 3 additions and 2 deletions

View File

@ -781,7 +781,7 @@ public class LauncherGUI implements Observer {
private void initComboBox(JComboBox<String> cb, String parameter, Parameter.ParameterType pType, String[] values) {
Parameter<String> paraObj = new Parameter<>(parameter, pType, String.class, values);
cb.setSelectedIndex(paraObj.getIndex());
if (cb.getItemListeners().length == 0) cb.addItemListener(new SettingsHandler.ComboBoxListener(paraObj));
if (cb.getItemListeners().length == 1) cb.addItemListener(new SettingsHandler.ComboBoxListener(paraObj));
}
private void initFolderChooser(JTextField showText, JButton actionButton, String parameter, Parameter.ParameterType pType, Callback.JFileSelectCallback check) {

View File

@ -109,4 +109,5 @@ note=Note
presets_note=Presets can only be used as preset for new user presents. You can create your own custom preset based on this server preset. The list of all mods will be used.
clone_preset=Clone preset
modset_exists_msg=Please choose another name for your preset.
modset_exists=Preset with these names already exists
modset_exists=Preset with these names already exists
update_now=Update now!