Skip to content

Commit c7fd0bb

Browse files
committed
Make save confirmation a child of last exclusive window of EditorNode before popup
1 parent e549802 commit c7fd0bb

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
@@ -5701,6 +5701,10 @@ void EditorNode::_cancel_close_scene_tab() {
57015701
}
57025702
}
57035703

5704+
void EditorNode::_prepare_save_confirmation_popup() {
5705+
save_confirmation->reparent(get_last_exclusive_window());
5706+
}
5707+
57045708
void EditorNode::_toggle_distraction_free_mode() {
57055709
if (EDITOR_GET("interface/editor/separate_distraction_mode")) {
57065710
int screen = editor_main_screen->get_selected_index();
@@ -7697,6 +7701,7 @@ EditorNode::EditorNode() {
76977701
save_confirmation->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_menu_confirm_current));
76987702
save_confirmation->connect("custom_action", callable_mp(this, &EditorNode::_discard_changes));
76997703
save_confirmation->connect("canceled", callable_mp(this, &EditorNode::_cancel_close_scene_tab));
7704+
save_confirmation->connect("about_to_popup", callable_mp(this, &EditorNode::_prepare_save_confirmation_popup));
77007705

77017706
gradle_build_manage_templates = memnew(ConfirmationDialog);
77027707
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
@@ -566,6 +566,8 @@ class EditorNode : public Node {
566566
void _scene_tab_closed(int p_tab);
567567
void _cancel_close_scene_tab();
568568

569+
void _prepare_save_confirmation_popup();
570+
569571
void _inherit_request(String p_file);
570572
void _instantiate_request(const Vector<String> &p_files);
571573

0 commit comments

Comments
 (0)