mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-28 09:24:14 +01:00
Merge pull request #11650 from cmaglie/fix_font_resize_hide_tabs
Fix: Font size change corrupts inactive tabs
This commit is contained in:
commit
23a023219b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user