diff options
-rw-r--r-- | app/src/processing/app/Editor.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 87d4ef61e..a307bde8f 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -1452,8 +1452,10 @@ public class Editor extends JFrame implements RunnerListener { // This must be run in the GUI thread SwingUtilities.invokeLater(() -> { codePanel.removeAll(); - codePanel.add(tabs.get(index), BorderLayout.CENTER); - tabs.get(index).requestFocusInWindow(); // get the caret blinking + EditorTab selectedTab = tabs.get(index); + codePanel.add(selectedTab, BorderLayout.CENTER); + selectedTab.applyPreferences(); + selectedTab.requestFocusInWindow(); // get the caret blinking // For some reason, these are needed. Revalidate says it should be // automatically called when components are added or removed, but without // it, the component switched to is not displayed. repaint() is needed to |