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

Ask before restarting project from settings #102017

Merged

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Jan 25, 2025

Fixes #43302
If you have only scenes that can be saved automatically, the editor will save them and restart without asking like before.

@KoBeWi KoBeWi added this to the 4.4 milestone Jan 25, 2025
Copy link
Contributor

@ryevdokimov ryevdokimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works, but note the error in the output tab after pressing Save & Restart. Not sure if it is relevant to this PR though.

2025-01-25.17-43-23.mp4

@KoBeWi
Copy link
Member Author

KoBeWi commented Jan 26, 2025

The save confirm dialog can't properly appear over other dialogs. It's not directly related to this PR, but makes the fix bugged :/

@ryevdokimov
Copy link
Contributor

Try it with this: #102070

@ryevdokimov
Copy link
Contributor

ryevdokimov commented Jan 27, 2025

The same thing should be done for project settings and possibly other places.

Any reason not to modify restart_editor() to just always do this? As it stands even the EditorInterface call is dangerous even with save: = true, since it will lead to lost progress.

image

image

@KoBeWi KoBeWi force-pushed the this_one_line_will_save_so_many_scenes branch from 4d61604 to f482284 Compare January 27, 2025 21:02
@KoBeWi
Copy link
Member Author

KoBeWi commented Jan 27, 2025

Makes sense, I changed restart_editor() instead.
Though the problem is that it allows to cancel restarting and some options don't support that properly, e.g. renderer change. I'd worry about that once someone runs into this issue though, as it's nothing major.

Copy link
Contributor

@ryevdokimov ryevdokimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works with: #102070

Tested in single and multi-window modes, and the various different scenarios. Code looks fine.

2025-01-28.11-19-12.mp4

@KoBeWi KoBeWi force-pushed the this_one_line_will_save_so_many_scenes branch from f482284 to e962bfc Compare February 16, 2025 10:17
@KoBeWi KoBeWi force-pushed the this_one_line_will_save_so_many_scenes branch from e962bfc to 00d8f5f Compare February 16, 2025 14:01
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected (both from the project settings and editor settings).

Code looks good to me.

@Calinou Calinou added the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Feb 16, 2025
@akien-mga akien-mga merged commit 72dbc5d into godotengine:master Feb 17, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restarting Godot from Editor Settings might discard unsaved scenes
4 participants