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

fix: "Reload Current Project" prompts the user to open Project Manager #60804

Merged
merged 1 commit into from
May 10, 2022
Merged

fix: "Reload Current Project" prompts the user to open Project Manager #60804

merged 1 commit into from
May 10, 2022

Conversation

RedHeadphone
Copy link
Contributor

fixes #60783

@@ -2715,7 +2715,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
bool confirm = EDITOR_GET("interface/editor/quit_confirmation");
if (confirm) {
confirmation->get_ok()->set_text(p_option == FILE_QUIT ? TTR("Quit") : TTR("Yes"));
confirmation->set_text(p_option == FILE_QUIT ? TTR("Exit the editor?") : TTR("Open Project Manager?"));
confirmation->set_text(p_option == FILE_QUIT ? TTR("Exit the editor?") : TTR("Reload Current Project?"));
Copy link
Member

Choose a reason for hiding this comment

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

That's not correct when using RUN_PROJECT_MANAGER. There are three possible options which should all have their wn text.

@Mickeon
Copy link
Contributor

Mickeon commented May 6, 2022

Does it really fix this? Feel free to correct me please, but I find the commit "Made reload current project ask for confirmation with unsaved changes" 8d1827c to be the cause of it. It is done in good faith, but the confirmation dialog does appear on reload even if there's no unsaved changes at all.

@RedHeadphone
Copy link
Contributor Author

@Mickeon So do I remove the confirmation if all files are saved?

@Mickeon
Copy link
Contributor

Mickeon commented May 6, 2022

I suppose so, yeah. As you've mentioned, this problem is not present in master. Something to do with the way it was cherry-picked.

@VitikaSoni
Copy link
Contributor

@Mickeon So do I remove the confirmation if all files are saved?

Use if else statement https://github.com/godotengine/godot/blob/3.x/editor/editor_node.cpp#L2718

@VitikaSoni
Copy link
Contributor

VitikaSoni commented May 6, 2022

If you are removing the confirmation then you have to remove interface/editor/quit_confirmation too, as now its of no use. Like in #32321

@akien-mga
Copy link
Member

That seems to go a bit over the scope of the issue it was trying to solve. This is removing the quit confirmation for quitting the editor in all cases.

@RedHeadphone
Copy link
Contributor Author

RedHeadphone commented May 10, 2022

So do I remove quit confirmation only when reloading project and files are saved? @akien-mga

@akien-mga
Copy link
Member

Yes, I think that would be the proper fix. You just need to check if (p_option != RELOAD_CURRENT_PROJECT) { [quit confirmation] } as done elsewhere in this multi-use case.

editor/editor_node.cpp Outdated Show resolved Hide resolved
@akien-mga akien-mga merged commit 6e07417 into godotengine:3.x May 10, 2022
@akien-mga
Copy link
Member

Thanks!

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.

5 participants