1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +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

@@ -1184,7 +1184,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break;
case TOOL_CREATE_USER_INTERFACE: {
Control *node = memnew(Control);
node->set_anchors_and_offsets_preset(PRESET_FULL_RECT); //more useful for resizable UIs.
// Making the root control full rect by default is more useful for resizable UIs.
node->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
node->set_grow_direction_preset(PRESET_FULL_RECT);
new_node = node;
} break;