Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/arduino/Arduino.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@arduino.cc>2021-08-23 13:09:38 +0300
committerGitHub <noreply@github.com>2021-08-23 13:09:38 +0300
commit23a023219b898b5b3563919955433dff8896d352 (patch)
treeda80ef123da91f9332e43eae7eda6cd64a0770bf
parent7ab56aa235ecb49a169df02922834445f754a4c3 (diff)
parentaf5a3d7801bbb681c36ac4297c54299e646740d7 (diff)
Merge pull request #11650 from cmaglie/fix_font_resize_hide_tabs
Fix: Font size change corrupts inactive tabs
-rw-r--r--app/src/processing/app/Editor.java6
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