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

No longer save all scripts automatically when closing the editor. #21854

Closed
wants to merge 1 commit into from
Closed

No longer save all scripts automatically when closing the editor. #21854

wants to merge 1 commit into from

Conversation

Piet-G
Copy link
Contributor

@Piet-G Piet-G commented Sep 8, 2018

This fixes #18010.

@KellyThomas
Copy link
Contributor

Will this show a "would you like to save changes?" prompt?

@Chaosus Chaosus added this to the 3.1 milestone Sep 8, 2018
@Piet-G
Copy link
Contributor Author

Piet-G commented Sep 8, 2018

@KellyThomas No, but it will only not save when you disable the save_each_scene_on_quit property in the editor settings. Previously that setting was just ignored for scripts.

@akien-mga
Copy link
Member

CC @Noshyaar

@akien-mga akien-mga requested a review from a user September 10, 2018 15:41
@ghost
Copy link

ghost commented Sep 10, 2018

save_each_scene_on_quit was introduced here: #9304 (comment)

There are two styles of save dialog depending on save_each_scene_on_quit. If true (default behavior), it will go through each unsaved scenes and ask whether you want it to be saved or not. If false, you can either save all scenes already on the disk, discard all or cancel. It was added because

  1. it's how other applications do it (GIMP afaik.)
  2. it's a faster flow if you save constantly. You can just discard all and quit the editor quickly.
  3. I kinda want the feedback whether this mode should be default or not.

(tbh I kinda regret adding it a bit since I don't think anyone would config it anyway and it bloats the editor settings.)

The logic when 'save all' is the same as clicking 'save all scenes' from the menu. The save_each_scene_on_quit property is not directly related to the script editor.

@akien-mga
Copy link
Member

IMO we should drop the save_each_scene_on_quit option, I agree that most users hardly know about it so it's probably not worth having.

Instead, maybe the two behaviours could be merged into one? i.e. have in the dialog:

  • Save current scene --> then moves on to next scene
  • Save all scenes
  • Discard current scene --> then moves on to next scene
  • Discard all scenes
  • Cancel

And same for scripts.

Of course 5 buttons would be too much, but maybe it could be done with 3 buttons + a checkbox "Apply to all scenes". Or if anyone has a better proposal :D

@akien-mga
Copy link
Member

As per the above discussion, this is not a proper fix for #18010 as it uses an editor option intended for another use case, as described in #21854 (comment) (and further discussed in #21959).

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

Successfully merging this pull request may close these issues.

Modified GDScript code gets saved to disk without a prompt
4 participants