summaryrefslogtreecommitdiff
path: root/editor/scene_tree_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/scene_tree_dock.cpp')
-rw-r--r--editor/scene_tree_dock.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index a8aeb05150..5ee5fbcf9c 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -491,8 +491,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
int index = E->get()->get_index();
- if (index > highest_id) highest_id = index;
- if (index < lowest_id) lowest_id = index;
+ if (index > highest_id)
+ highest_id = index;
+ if (index < lowest_id)
+ lowest_id = index;
if (E->get()->get_parent() != common_parent)
common_parent = nullptr;
@@ -501,8 +503,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (!common_parent || (MOVING_DOWN && highest_id >= common_parent->get_child_count() - MOVING_DOWN) || (MOVING_UP && lowest_id == 0))
break; // one or more nodes can not be moved
- if (selection.size() == 1) editor_data->get_undo_redo().create_action(TTR("Move Node In Parent"));
- if (selection.size() > 1) editor_data->get_undo_redo().create_action(TTR("Move Nodes In Parent"));
+ if (selection.size() == 1)
+ editor_data->get_undo_redo().create_action(TTR("Move Node In Parent"));
+ if (selection.size() > 1)
+ editor_data->get_undo_redo().create_action(TTR("Move Nodes In Parent"));
for (int i = 0; i < selection.size(); i++) {
Node *top_node = selection[i];
@@ -986,8 +990,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
} else {
switch (p_tool) {
- case TOOL_CREATE_2D_SCENE: new_node = memnew(Node2D); break;
- case TOOL_CREATE_3D_SCENE: new_node = memnew(Node3D); break;
+ case TOOL_CREATE_2D_SCENE:
+ new_node = memnew(Node2D);
+ break;
+ case TOOL_CREATE_3D_SCENE:
+ new_node = memnew(Node3D);
+ break;
case TOOL_CREATE_USER_INTERFACE: {
Control *node = memnew(Control);
node->set_anchors_and_margins_preset(PRESET_WIDE); //more useful for resizable UIs.