@@ -5785,9 +5785,9 @@ void EditorNode::_cancel_close_scene_tab() {
57855785 }
57865786}
57875787
5788- void EditorNode::_prepare_save_confirmation_popup ( ) {
5789- if (save_confirmation ->get_window () != get_last_exclusive_window ()) {
5790- save_confirmation ->reparent (get_last_exclusive_window ());
5788+ void EditorNode::_prepare_confirmation_dialog (ConfirmationDialog *dialog ) {
5789+ if (dialog ->get_window () != get_last_exclusive_window ()) {
5790+ dialog ->reparent (get_last_exclusive_window ());
57915791 }
57925792}
57935793
@@ -7802,7 +7802,7 @@ EditorNode::EditorNode() {
78027802 save_confirmation->connect (SceneStringName (confirmed), callable_mp (this , &EditorNode::_menu_confirm_current));
78037803 save_confirmation->connect (" custom_action" , callable_mp (this , &EditorNode::_discard_changes));
78047804 save_confirmation->connect (" canceled" , callable_mp (this , &EditorNode::_cancel_close_scene_tab));
7805- save_confirmation->connect (" about_to_popup" , callable_mp (this , &EditorNode::_prepare_save_confirmation_popup ));
7805+ save_confirmation->connect (" about_to_popup" , callable_mp (this , &EditorNode::_prepare_confirmation_dialog). bind (save_confirmation ));
78067806
78077807 gradle_build_manage_templates = memnew (ConfirmationDialog);
78087808 gradle_build_manage_templates->set_text (TTR (" Android build template is missing, please install relevant templates." ));
@@ -7916,6 +7916,7 @@ EditorNode::EditorNode() {
79167916
79177917 disk_changed->add_button (TTR (" Ignore external changes" ), !DisplayServer::get_singleton ()->get_swap_cancel_ok (), " resave" );
79187918 disk_changed->connect (" custom_action" , callable_mp (this , &EditorNode::_resave_scenes));
7919+ disk_changed->connect (" about_to_popup" , callable_mp (this , &EditorNode::_prepare_confirmation_dialog).bind (disk_changed));
79197920 }
79207921
79217922 gui_base->add_child (disk_changed);
0 commit comments