summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-21 13:00:43 +0200
committerGitHub <noreply@github.com>2022-06-21 13:00:43 +0200
commitb5f20a49a16d23e6f9f9f349087af5620ed64cd3 (patch)
treede70e33232fdfd2cbf95ee9e059cbf4bff9e2c61
parent0aa85f4ff82ad9557380855ea1f8847a3c3d0dfa (diff)
parent72a768b24f11e2f425f8fb24445bd6b35009600a (diff)
Merge pull request #62270 from Rindbee/avoid-two-showing-dialog
-rw-r--r--editor/scene_tree_editor.cpp3
1 files changed, 2 insertions, 1 deletions
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());
}
}