1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Fix inconsistent state of Controls when editing and running scenes

This commit is contained in:
Yuri Sizov
2023-01-03 19:21:26 +03:00
parent e84bab8e4f
commit 00b5222f66
4 changed files with 42 additions and 27 deletions

View File

@@ -171,7 +171,9 @@ Node *SceneCreateDialog::create_scene_root() {
break;
case ROOT_USER_INTERFACE: {
Control *gui_ctl = memnew(Control);
// Making the root control full rect by default is more useful for resizable UIs.
gui_ctl->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
gui_ctl->set_grow_direction_preset(Control::PRESET_FULL_RECT);
root = gui_ctl;
} break;
case ROOT_OTHER: