diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-28 12:48:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 12:48:59 +0100 |
commit | 345b4bb86ae9b3e5d3cee6078a7e452b7c933200 (patch) | |
tree | 9cd94981f42204a93d2b83df4db56265bdf56c67 /scene/main | |
parent | 9b7aeaf88fb9aab0c469b21a2058f17fdd4d8732 (diff) | |
parent | 128e98c124d2044d8c78b07afc4be0586ba28f30 (diff) |
Merge pull request #58282 from keptsecret/filedialog_visibility_unresponsive
Fix to prevent AcceptDialog and children class taking over main window
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/window.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 6eccb4da9a..6837fcae21 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -436,8 +436,12 @@ void Window::set_visible(bool p_visible) { //update transient exclusive if (transient_parent) { if (exclusive && visible) { - ERR_FAIL_COND_MSG(transient_parent->exclusive_child && transient_parent->exclusive_child != this, "Transient parent has another exclusive child."); - transient_parent->exclusive_child = this; +#ifdef TOOLS_ENABLED + if (!(Engine::get_singleton()->is_editor_hint() && get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root()->is_ancestor_of(this))) { + ERR_FAIL_COND_MSG(transient_parent->exclusive_child && transient_parent->exclusive_child != this, "Transient parent has another exclusive child."); + transient_parent->exclusive_child = this; + } +#endif } else { if (transient_parent->exclusive_child == this) { transient_parent->exclusive_child = nullptr; |