浏览代码

Prevent save confirmation dialog from trying to parent to itself

Robert Yevdokimov 8 月之前
父节点
当前提交
1c384e7b78
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      editor/editor_node.cpp

+ 3 - 1
editor/editor_node.cpp

@@ -5734,7 +5734,9 @@ void EditorNode::_cancel_close_scene_tab() {
 }
 
 void EditorNode::_prepare_save_confirmation_popup() {
-	save_confirmation->reparent(get_last_exclusive_window());
+	if (save_confirmation->get_window() != get_last_exclusive_window()) {
+		save_confirmation->reparent(get_last_exclusive_window());
+	}
 }
 
 void EditorNode::_toggle_distraction_free_mode() {