Fixed not updating theme when editing active theme bug.

This commit is contained in:
DieGurke 2019-12-27 17:34:28 +01:00
parent 6150b995c4
commit 286f487fc9

View File

@ -143,7 +143,11 @@ public class ThemeCustomizationPanel extends SettingsPanel {
}, (name) -> {
// Modify theme
Settings.getInstance().getThemes().replace(name, new Theme(name, temporaryTheme));
themes.setSelectedItem(name);
if(themes.getSelectedItem().equals(name)) {
EventBus.getInstance().dispatch(new ThemeChangeEvent(Settings.getInstance().getTheme(name)));
}else {
themes.setSelectedItem(name);
}
}).setVisible(true);
themeChanged = false;
}