open sketches in the current window, if no code has been written yet
In GitLab by @Pomax on May 8, 2022, 18:30
Description
It would be great if Processing didn't need to open a second window if you run it first, then load a project (either directly or using the "open recent" function).
Expected Behavior
Loading a project with an empty editor loads the project in the current editor instance.
Current Behavior
A second Processing instance is created for the loaded sketch code.
Steps to Reproduce
- Open processing by directly running the application
- Load a project
Your Environment
- Processing version: 4.0b8
- Operating System and OS version: Win10 pro 21H2
- Other information:
Possible Causes / Solutions
Duplicate of https://github.com/processing/processing4/issues/477
As far as I understand, this is a different question. That duplicate is specifically about double-clicking a file, whereas this is about an already opened Processing window, and opening a project from File→Open Recent, and that leaving behind the useless empty sketch which you have to close every single time if you always open things with Open Recent.
Correct: this is specifically about not using a file browser to start Processing by double-clicking/activating a .pde file: First open Processing on its own, then use the "file -> open" or "file -> recent" menu options to load a sketch.
Sounds like a regression. This has worked properly at various points in the past; I may not have bothered re-wiring it properly when doing the handleOpen() rewrite.