diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-12 10:16:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-12 10:16:39 +0100 |
commit | 55b49dc71b687b9edf640ae2264879852f0b0503 (patch) | |
tree | 8121e09e620e63e6eeee890a5ba25b2dd88aa33d /editor | |
parent | 17759330695fdf4f2ec9c277574a1979a01bf8fb (diff) | |
parent | 688f42c6913ace275d5005195062e51503af475f (diff) |
Merge pull request #54816 from KoBeWi/brute_rename
Diffstat (limited to 'editor')
-rw-r--r-- | editor/scene_tree_dock.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 921befbb6b..a5605c5b16 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -214,7 +214,7 @@ void SceneTreeDock::_perform_instantiate_scenes(const Vector<String> &p_files, N for (int i = 0; i < instances.size(); i++) { Node *instantiated_scene = instances[i]; - editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene); + editor_data->get_undo_redo().add_do_method(parent, "add_child", instantiated_scene, true); if (p_pos >= 0) { editor_data->get_undo_redo().add_do_method(parent, "move_child", instantiated_scene, p_pos + i); } @@ -259,8 +259,8 @@ void SceneTreeDock::_replace_with_branch_scene(const String &p_file, Node *base) int pos = base->get_index(); undo_redo->add_do_method(parent, "remove_child", base); undo_redo->add_undo_method(parent, "remove_child", instantiated_scene); - undo_redo->add_do_method(parent, "add_child", instantiated_scene); - undo_redo->add_undo_method(parent, "add_child", base); + undo_redo->add_do_method(parent, "add_child", instantiated_scene, true); + undo_redo->add_undo_method(parent, "add_child", base, true); undo_redo->add_do_method(parent, "move_child", instantiated_scene, pos); undo_redo->add_undo_method(parent, "move_child", base, pos); @@ -512,7 +512,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { ERR_CONTINUE(!dup); - editor_data->get_undo_redo().add_do_method(paste_parent, "add_child", dup); + editor_data->get_undo_redo().add_do_method(paste_parent, "add_child", dup, true); for (KeyValue<const Node *, Node *> &E2 : duplimap) { Node *d = E2.value; @@ -814,7 +814,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_data->get_undo_redo().create_action(TTR("Make node as Root")); editor_data->get_undo_redo().add_do_method(node->get_parent(), "remove_child", node); editor_data->get_undo_redo().add_do_method(editor, "set_edited_scene", node); - editor_data->get_undo_redo().add_do_method(node, "add_child", root); + editor_data->get_undo_redo().add_do_method(node, "add_child", root, true); editor_data->get_undo_redo().add_do_method(node, "set_scene_file_path", root->get_scene_file_path()); editor_data->get_undo_redo().add_do_method(root, "set_scene_file_path", String()); editor_data->get_undo_redo().add_do_method(node, "set_owner", (Object *)nullptr); @@ -825,7 +825,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_data->get_undo_redo().add_undo_method(node, "set_scene_file_path", String()); editor_data->get_undo_redo().add_undo_method(node, "remove_child", root); editor_data->get_undo_redo().add_undo_method(editor, "set_edited_scene", root); - editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node); + editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node, true); editor_data->get_undo_redo().add_undo_method(node->get_parent(), "move_child", node, node->get_index()); editor_data->get_undo_redo().add_undo_method(root, "set_owner", (Object *)nullptr); editor_data->get_undo_redo().add_undo_method(node, "set_owner", root); @@ -1786,7 +1786,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V } editor_data->get_undo_redo().add_do_method(node->get_parent(), "remove_child", node); - editor_data->get_undo_redo().add_do_method(new_parent, "add_child", node); + editor_data->get_undo_redo().add_do_method(new_parent, "add_child", node, true); if (p_position_in_parent >= 0) { editor_data->get_undo_redo().add_do_method(new_parent, "move_child", node, p_position_in_parent + inc); @@ -1859,7 +1859,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V int child_pos = node->get_index(); - editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node); + editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node, true); editor_data->get_undo_redo().add_undo_method(node->get_parent(), "move_child", node, child_pos); editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners); if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == node) { @@ -2072,7 +2072,7 @@ void SceneTreeDock::_delete_confirm(bool p_cut) { } editor_data->get_undo_redo().add_do_method(n->get_parent(), "remove_child", n); - editor_data->get_undo_redo().add_undo_method(n->get_parent(), "add_child", n); + editor_data->get_undo_redo().add_undo_method(n->get_parent(), "add_child", n, true); editor_data->get_undo_redo().add_undo_method(n->get_parent(), "move_child", n, n->get_index()); if (AnimationPlayerEditor::get_singleton()->get_track_editor()->get_root() == n) { editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::get_singleton()->get_track_editor(), "set_root", n); |