Files
.CooCoo 4b3dcf3c48 Projects: Open Project asks to save unsaved changes first (#1665)
* Projects: Open Project asks to save unsaved changes first

File ▸ Open Project opened the chosen project at once, so a project with
unsaved changes was replaced without a prompt. Close Project and Quit
(#758) already ask first.

In the desktop app, once the project to open is chosen, the same Save
Project prompt now appears when the open project has unsaved changes,
with the automation ids `openProject.save`, `openProject.dontSave` and
`openProject.cancel`. Save saves the project and then opens the chosen
one; a never-saved project goes through the Save dialog, and canceling
it returns to the prompt. On Linux, where the Save dialog does not
block, the prompt stays open after a never-saved project is saved, as
it does for Close Project and Quit, and a second Save or Don't Save
opens the chosen project. Don't Save opens the chosen project without
saving, and Cancel keeps the open project. When the chosen project
can't be opened, the open project stays open with its changes and the
error goes to the status line. `file.open` with a `path` opens without
asking, as before. The prompt reuses existing strings.

* Contributors: add dotCooCoo (Robert Lee)

* Projects: Open Recent and Home's Recent list ask to save unsaved changes first

File > Open Recent and a click in Home's Recent list sent `file.open`
with a path, so a project with unsaved changes was replaced without a
prompt. Both now call `intercept_open` and show the Save Project prompt
first, as Open Project does. After Save or Don't Save the chosen project
opens; a Recent row on Home then switches to Edit, as it does without
the prompt. `file.open` with a path from the control channel or MCP
still opens without asking.

* Projects: Open Project opens the chosen project after a later Save dialog answer

On Linux the Save dialog answers in a later frame. Save in the Open Project
prompt on a never-saved project checked whether the project was saved right
after showing the dialog, found it unsaved and showed the prompt again; the
answer then saved the project but did not open the chosen one.

Saving and then opening the chosen project now run when the dialog answers.
A canceled dialog or a failed save shows the prompt again, with the reason in
the status line. An answer that arrives after another project was opened,
created or closed to does nothing: `Session::project_generation` counts the
projects a session has held, as in #2437. The prompt offers Save whenever a
Save dialog can be shown, also through `HostHooks::run_dialog`.

* Projects: a save prompt closes when a script replaces its project

The Close Project, Open Project and Quit prompts stayed open when a
script opened, created or closed to another project while they were
shown, and Save or Don't Save then acted on the new project: Don't Save
discarded its changes and Save saved it. Each prompt now records the
project it was asked over (`Session::project_generation`) and closes
when that project has been replaced.

* Projects: a Recent row on Home switches to Edit only once its project opens

With unsaved changes, a click in Home's Recent list switched to Edit as
soon as the Save Project prompt appeared, so Cancel left Edit showing
the current project instead of Home. Home now stays while the prompt is
shown and after Cancel, and switches to Edit after Save or Don't Save
opens the chosen project, also when Save first asks where to save.

* Open Project: a failed save keeps the prompt and the chosen project

When the open project already has a file and saving it fails, the Open Project prompt now stays open with the chosen project, as it does for a project that was never saved. The error shows in the status bar.

* Open Project: only its prompt offers Save through a Save dialog that answers later

Close Project and Quit offer Save for a never-saved project only where the Save dialog answers at once, as on main. After a Save dialog that answers later, only Open Project goes on to its next step.

* Projects: a failed save keeps the Close Project and Quit prompts

When the open project already has a file and saving it fails, the Close Project and Quit prompts now stay open, as the Open Project prompt does. The error shows in the status bar.

* Projects: the Open Project prompt blocks panels in floating windows

While the Open Project prompt is shown, panels in floating windows no longer take input, as for the Close Project and Quit prompts.
2026-11-06 11:06:17 +01:00
..
2026-10-31 05:27:25 +00:00
2026-10-31 04:17:42 +00:00
2026-10-31 02:17:34 +00:00
2026-10-31 05:27:25 +00:00
2026-10-31 03:39:22 +00:00
2026-10-31 02:17:34 +00:00