-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Made reload current project ask for confirmation with unsaved changes #59442
Conversation
@@ -169,7 +170,7 @@ class EditorNode : public Node { | |||
RUN_PLAY_CUSTOM_SCENE, | |||
RUN_SETTINGS, | |||
RUN_USER_DATA_FOLDER, | |||
RUN_RELOAD_CURRENT_PROJECT, | |||
RELOAD_CURRENT_PROJECT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I had missed that FILE_CLOSE_ALL_AND_RUN_RELOAD_CURRENT_PROJECT
was matching a pre-existing RUN_RELOAD_CURRENT_PROJECT
. It seems like contributors over time have all prefixed their new actions with RUN_
without understanding that the original RUN_
actions are the actions to actually run the project/a scene.
So RUN_SETTINGS
, RUN_USER_DATA_FOLDER
, RUN_PROJECT_MANAGER
are all misnomers. But this is material for a different PR refactoring that code.
Thanks! |
Cherry-picked for 3.5. |
Minor change (not really a regression) in behavior after the 3.5 fix: 3.4.4-stable behavior:
3.5-RC6 behavior:
For me, this is a small hit to usability, because it was nice previously to just hit "project reload" (after quickly hitting ctrl-shift-alt-S to force global save, due to the bug) when you need to clear any lingering editor issues and then land right back in the same scene after reload to continue on. But now we have to go find the scene we were working on and reopen it. Not a big deal, but just noting the change in behavior. You can observe how the "save and reload" step now closes the active scene, leaving just the "empty" tab before reloading the project, so I guess that new step is why it doesn't reopen the previously active scene on reload. Note that in both 3.4.4 and 3.5-RC6, if you ONLY make an unsaved change to a script (i.e. no change to scenetree) and hit RELOAD CURRENT PROJECT then it autosaves WITHOUT showing the "do you want to save" dialog, and in both cases the project will be reloaded with the previously active script tab open and active again. This post-fix change (no longer reopens the active scene) only exhibits when there are unsaved changes to the scenetree. UPDATE: I missed that Vitika9 already referred to this in the first post:
For me, the issue as I describe above does NOT happen when I turn OFF the editor setting "Save Each Scene On Quit" (default setting is ON). In that case, the last active scene DOES reopen on project reload. |
You are right about this happening in 3.5-RC6 but I am unable to reproduce it in master branch, so maybe its not about this PR. |
Sounds similar to #33326 |
Fix #52287
I tested that this (and quit) doesn't work when save each scene on quit setting is turned off, idk if issue is reported or not but I left this problem as is because it should be covered in a separate PR.