Merge pull request #85 from informatik-ag-ngl/b/activeThemeEdit

Fixed not updating theme when editing active theme bug.
This commit is contained in:
Kai S. K. Engelbart 2019-12-28 21:48:50 +02:00 committed by GitHub
commit 9725945b5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}