Skip to content

Commit af5a3d7

Browse files
committed
makeup: factor call to tabs.get(index)
1 parent 240e1b5 commit af5a3d7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/src/processing/app/Editor.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1450,9 +1450,10 @@ public void selectTab(final int index) {
14501450
// This must be run in the GUI thread
14511451
SwingUtilities.invokeLater(() -> {
14521452
codePanel.removeAll();
1453-
codePanel.add(tabs.get(index), BorderLayout.CENTER);
1454-
tabs.get(index).requestFocusInWindow(); // get the caret blinking
1455-
tabs.get(index).applyPreferences();
1453+
EditorTab selectedTab = tabs.get(index);
1454+
codePanel.add(selectedTab, BorderLayout.CENTER);
1455+
selectedTab.applyPreferences();
1456+
selectedTab.requestFocusInWindow(); // get the caret blinking
14561457
// For some reason, these are needed. Revalidate says it should be
14571458
// automatically called when components are added or removed, but without
14581459
// it, the component switched to is not displayed. repaint() is needed to

0 commit comments

Comments
 (0)