make it easy to edit popupmenus, fixes #2595
This commit is contained in:
parent
0c6a4b47a6
commit
45ad1024e1
1 changed files with 8 additions and 0 deletions
|
@ -45,6 +45,14 @@ void Popup::_notification(int p_what) {
|
|||
emit_signal("popup_hide");
|
||||
}
|
||||
}
|
||||
|
||||
if (p_what==NOTIFICATION_ENTER_TREE) {
|
||||
//small helper to make editing of these easier in editor
|
||||
if (get_tree()->is_editor_hint() && get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) {
|
||||
set_as_toplevel(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Popup::_fix_size() {
|
||||
|
|
Loading…
Reference in a new issue