Skip to content

Commit a9d10e0

Browse files
author
Federico Fissore
committed
Editor: force setting text area content in event dispatcher thread
1 parent f61cbb4 commit a9d10e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/processing/app/Sketch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ private void setCurrentCode(int which, boolean forceUpdate) {
999999
current = (SketchCodeDocument) data.getCode(which).getMetadata();
10001000
currentIndex = which;
10011001

1002-
editor.setCode(current);
1002+
SwingUtilities.invokeLater(() -> editor.setCode(current));
10031003

10041004
editor.header.rebuild();
10051005
}

0 commit comments

Comments
 (0)