Skip to content

Commit 9ee1873

Browse files
committed
Merge pull request godotengine#102070 from ryevdokimov/reparent-save-confirmation
Make save confirmation a child of last exclusive window of EditorNode before popup
2 parents 699237d + c7fd0bb commit 9ee1873

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

editor/editor_node.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -5730,6 +5730,10 @@ void EditorNode::_cancel_close_scene_tab() {
57305730
}
57315731
}
57325732

5733+
void EditorNode::_prepare_save_confirmation_popup() {
5734+
save_confirmation->reparent(get_last_exclusive_window());
5735+
}
5736+
57335737
void EditorNode::_toggle_distraction_free_mode() {
57345738
if (EDITOR_GET("interface/editor/separate_distraction_mode")) {
57355739
int screen = editor_main_screen->get_selected_index();
@@ -7737,6 +7741,7 @@ EditorNode::EditorNode() {
77377741
save_confirmation->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_menu_confirm_current));
77387742
save_confirmation->connect("custom_action", callable_mp(this, &EditorNode::_discard_changes));
77397743
save_confirmation->connect("canceled", callable_mp(this, &EditorNode::_cancel_close_scene_tab));
7744+
save_confirmation->connect("about_to_popup", callable_mp(this, &EditorNode::_prepare_save_confirmation_popup));
77407745

77417746
gradle_build_manage_templates = memnew(ConfirmationDialog);
77427747
gradle_build_manage_templates->set_text(TTR("Android build template is missing, please install relevant templates."));

editor/editor_node.h

+2
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,8 @@ class EditorNode : public Node {
576576
void _scene_tab_closed(int p_tab);
577577
void _cancel_close_scene_tab();
578578

579+
void _prepare_save_confirmation_popup();
580+
579581
void _inherit_request(String p_file);
580582
void _instantiate_request(const Vector<String> &p_files);
581583

0 commit comments

Comments
 (0)