Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quit does not ask to save resources and causes data loss. #45612

Closed
lyuma opened this issue Jan 31, 2021 · 1 comment · Fixed by #65504
Closed

Quit does not ask to save resources and causes data loss. #45612

lyuma opened this issue Jan 31, 2021 · 1 comment · Fixed by #65504

Comments

@lyuma
Copy link
Contributor

lyuma commented Jan 31, 2021

Godot version:
4.0.dev c9413b513fd2fb95e9b71d886e01a04e379bb969

OS/device including version:
Windows 10.0.19041.746
Nvidia RTX 2080 Ti driver 452.06

Issue description:
When exiting the editor (such as Quit; or Quit to Project List; or the X button on the godot editor), no attempt is made to notify the user of unsaved resources, and in the case that no unsaved scenes are open, no attempt is made to give the user a chance to save their work.

Note that when the current scene is unsaved, the editor may pop up a confirmation dialog. However, this dialog has a few problems.

  1. When no scenes have unsaved changes, the dialog does not even appear, and the editor is closed instantly.
  2. It does not notify the user of the fact that there are unsaved resources in addition to the scene.
  3. If the user clicks "Dont Save" in order not to save the scene, the resource changes are discarded.

image

Related to issues #45611 and #9069, but this problem is about the lack of confirmation at the moment when data is about to be lost.

One solution would be to notify the user of unsaved resources.
Another solution would be to automatically save them (given that other unrelated actions can sometimes automatically save all resources without notification or confirmation)

Steps to reproduce:

  1. Create a new project or open existing
  2. Double click default_env.tres
  3. Expand Sky. Then, in the Sky fleld, click Sky to expand the sky object.
  4. In the Sky Material box, create a new PanoramaSky
  5. The 3d scene should turn light blue.
  6. Quit to Project List and reopen.
  7. The default_sky.tres was not saved. The scene is black again.

Minimal reproduction project:
Happens in a new project

@Calinou
Copy link
Member

Calinou commented Jan 31, 2021

Related to #45601.

We could partially fix this by reverting #32321, but I'd prefer fixing the actual issue. Even if you revert #32321, the message will still be misleading when exiting the editor.

  1. If the user clicks "Dont Save" in order not to save the scene, the resource changes are discarded.

I think this is done by design. I don't want anything to be saved if I discard changes. The editor shouldn't save things "partially" if it can result in an inconsistent state (new resources but old scene). Also, keep in mind that built-in resources and external resources will have to be handled differently here.

At the end of the day, we're facing issues very similar to godotengine/godot-proposals#2109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants