processing4 icon indicating copy to clipboard operation
processing4 copied to clipboard

open sketches in the current window, if no code has been written yet

Open processing-bot opened this issue 3 years ago • 4 comments

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

  1. Open processing by directly running the application
  2. Load a project

Your Environment

  • Processing version: 4.0b8
  • Operating System and OS version: Win10 pro 21H2
  • Other information:

Possible Causes / Solutions

processing-bot avatar May 08 '22 16:05 processing-bot

Duplicate of https://github.com/processing/processing4/issues/477

benfry avatar May 09 '22 19:05 benfry

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.

dzaima avatar May 09 '22 19:05 dzaima

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.

Pomax avatar May 10 '22 15:05 Pomax

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.

benfry avatar May 11 '22 13:05 benfry