From 286f487fc971b2f17696c6ab11ca1910c0de9e37 Mon Sep 17 00:00:00 2001 From: DieGurke <55625494+DieGurke@users.noreply.github.com> Date: Fri, 27 Dec 2019 17:34:28 +0100 Subject: [PATCH] Fixed not updating theme when editing active theme bug. --- .../envoy/client/ui/settings/ThemeCustomizationPanel.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/envoy/client/ui/settings/ThemeCustomizationPanel.java b/src/main/java/envoy/client/ui/settings/ThemeCustomizationPanel.java index 9b1a85a..ba5da87 100644 --- a/src/main/java/envoy/client/ui/settings/ThemeCustomizationPanel.java +++ b/src/main/java/envoy/client/ui/settings/ThemeCustomizationPanel.java @@ -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; }