diff --git a/CHANGELOG.md b/CHANGELOG.md index 04b913a2..61db7e54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ FlatLaf Change Log - TextArea: Update background color property if enabled or editable state changes in the same way as Swing does it for all other text components. (issue #147) +- Demo: Fixed restoring last used theme on startup. (regression in 0.39) #### Other Changes 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 8f48a7ed..3566322a 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 @@ -205,11 +205,11 @@ public class IJThemesPanel break; } } - } - // select first theme if none selected - if( themesList.getSelectedIndex() < 0 ) - themesList.setSelectedIndex( 0 ); + // select first theme if none selected + if( themesList.getSelectedIndex() < 0 ) + themesList.setSelectedIndex( 0 ); + } // scroll selection into visible area int sel = themesList.getSelectedIndex();