From 240e1b5624681ae9d60741be1b9b80489ac26a24 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 18 Aug 2021 11:58:13 +0200 Subject: Force font metrics recalculation when changing tabs Fix #7321 --- app/src/processing/app/Editor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index c1be9b5ef..eabeac18e 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -1452,6 +1452,7 @@ public class Editor extends JFrame implements RunnerListener { codePanel.removeAll(); codePanel.add(tabs.get(index), BorderLayout.CENTER); tabs.get(index).requestFocusInWindow(); // get the caret blinking + tabs.get(index).applyPreferences(); // 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 -- cgit v1.2.3