浏览代码

Merge pull request #62270 from Rindbee/avoid-two-showing-dialog

Rémi Verschelde 3 年之前
父节点
当前提交
b5f20a49a1
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      editor/scene_tree_editor.cpp

+ 2 - 1
editor/scene_tree_editor.cpp

@@ -1353,8 +1353,9 @@ void SceneTreeDialog::_cancel() {
 
 void SceneTreeDialog::_select() {
 	if (tree->get_selected()) {
-		emit_signal(SNAME("selected"), tree->get_selected()->get_path());
+		// The signal may cause another dialog to be displayed, so be sure to hide this one first.
 		hide();
+		emit_signal(SNAME("selected"), tree->get_selected()->get_path());
 	}
 }