1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Clear color was not correctly being set, fixes #4939

This commit is contained in:
Juan Linietsky
2018-07-29 15:09:42 -03:00
parent c752c26427
commit 7b63c6323d
5 changed files with 16 additions and 3 deletions

View File

@@ -803,7 +803,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
switch (p_tool) {
case TOOL_CREATE_2D_SCENE: new_node = memnew(Node2D); break;
case TOOL_CREATE_3D_SCENE: new_node = memnew(Spatial); break;
case TOOL_CREATE_USER_INTERFACE: new_node = memnew(Control); break;
case TOOL_CREATE_USER_INTERFACE: {
Control *node = memnew(Control);
node->set_anchors_and_margins_preset(PRESET_WIDE); //more useful for resizable UIs.
new_node = node;
} break;
}
editor_data->get_undo_redo().create_action("New Scene Root");