From 72a768b24f11e2f425f8fb24445bd6b35009600a Mon Sep 17 00:00:00 2001 From: Rindbee Date: Tue, 21 Jun 2022 16:40:57 +0800 Subject: Avoid possibly showing two Dialogs at the same time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update editor/scene_tree_editor.cpp Add a comment to explain why Co-authored-by: RĂ©mi Verschelde --- editor/scene_tree_editor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'editor') diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 5536e09da7..86fa9222c0 100644 --- a/editor/scene_tree_editor.cpp +++ b/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()); } } -- cgit v1.2.3