Hide visible popups by default if visible when entering tree, unless on editor. Fixes #24737
This commit is contained in:
parent
81180b266a
commit
ed9b230744
1 changed files with 5 additions and 1 deletions
|
@ -52,9 +52,13 @@ void Popup::_notification(int p_what) {
|
||||||
//small helper to make editing of these easier in editor
|
//small helper to make editing of these easier in editor
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (Engine::get_singleton()->is_editor_hint() && get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) {
|
if (Engine::get_singleton()->is_editor_hint() && get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) {
|
||||||
|
//edited on editor
|
||||||
set_as_toplevel(false);
|
set_as_toplevel(false);
|
||||||
}
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
if (is_visible()) {
|
||||||
|
hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue