mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Set update count on Editor startup
This commit is contained in:
@@ -523,7 +523,14 @@ public class Base {
|
||||
}
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
|
||||
private int updatesAvailable = 0;
|
||||
|
||||
|
||||
public void setUpdatesAvailable(int n) {
|
||||
updatesAvailable = n;
|
||||
synchronized (editors) {
|
||||
for (Editor e : editors) {
|
||||
e.setUpdatesAvailable(n);
|
||||
@@ -1229,6 +1236,8 @@ public class Base {
|
||||
try {
|
||||
Editor editor = nextMode.createEditor(this, path, state);
|
||||
|
||||
editor.setUpdatesAvailable(updatesAvailable);
|
||||
|
||||
// opened successfully, let's go to work
|
||||
editor.getSketch().setUntitled(untitled);
|
||||
editors.add(editor);
|
||||
|
||||
Reference in New Issue
Block a user