From 8e6e971b515f4bf7ba914269f58c631a73e95d7a Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 3 May 2020 18:23:16 +0200 Subject: [PATCH] IntelliJ Themes Demo: theme save and github buttons were not enabled when starting demo with active IntelliJ theme --- .../formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java index eb8c4c35..45cf3742 100644 --- a/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java +++ b/flatlaf-demo/src/main/java/com/formdev/flatlaf/demo/intellijthemes/IJThemesPanel.java @@ -198,14 +198,14 @@ public class IJThemesPanel } private void themesListValueChanged( ListSelectionEvent e ) { - if( e.getValueIsAdjusting() || isAdjustingThemesList ) - return; - IJThemeInfo themeInfo = themesList.getSelectedValue(); boolean bundledTheme = (themeInfo != null && themeInfo.resourceName != null); saveButton.setEnabled( bundledTheme ); sourceCodeButton.setEnabled( bundledTheme ); + if( e.getValueIsAdjusting() || isAdjustingThemesList ) + return; + EventQueue.invokeLater( () -> { setTheme( themeInfo ); } );