Skip to content

Commit

Permalink
Update SettingsWindow.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mkacct committed May 10, 2024
1 parent 3d011fc commit 3d4290f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/gui/SettingsWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ private SettingControl(ConfigSpec.Setting setting, Configuration initialConfig)
String initStr = initialConfig.getString(setting.name, null);
if (setting.hasStringOptions()) {
if (!setting.getStringOptions().contains(initStr)) {initStr = null;}
this.valueSupplier = this.initEnumStringControl(inputPanel, initStr);
this.valueSupplier = this.initSelectStringControl(inputPanel, initStr);
} else {
this.valueSupplier = this.initStringControl(inputPanel, initStr);
}
Expand Down Expand Up @@ -347,7 +347,7 @@ private Supplier<Object> initStringControl(JPanel inputPanel, String initVal) {
};
}

private Supplier<Object> initEnumStringControl(JPanel inputPanel, String initVal) {
private Supplier<Object> initSelectStringControl(JPanel inputPanel, String initVal) {
List<String> options = new ArrayList<String>(List.of(NO_SELECTION_STRING));
options.addAll(setting.getStringOptions());
JComboBox<String> optionComboBox = new JComboBox<String>(options.toArray(new String[0]));
Expand Down

0 comments on commit 3d4290f

Please sign in to comment.