summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRindbee <idleman@yeah.net>2022-06-21 16:40:57 +0800
committerRindbee <idleman@yeah.net>2022-06-21 17:21:04 +0800
commit72a768b24f11e2f425f8fb24445bd6b35009600a (patch)
treede70e33232fdfd2cbf95ee9e059cbf4bff9e2c61 /editor
parent0aa85f4ff82ad9557380855ea1f8847a3c3d0dfa (diff)
Avoid possibly showing two Dialogs at the same time
Update editor/scene_tree_editor.cpp Add a comment to explain why Co-authored-by: RĂ©mi Verschelde <rverschelde@gmail.com>
Diffstat (limited to 'editor')
-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());
}
}