mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Unify usage of undo_redo in editor
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include "editor/editor_paths.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "editor/multi_node_edit.h"
|
||||
#include "editor/plugins/animation_player_editor_plugin.h"
|
||||
#include "editor/plugins/canvas_item_editor_plugin.h"
|
||||
@@ -267,7 +268,7 @@ void SceneTreeDock::_replace_with_branch_scene(const String &p_file, Node *base)
|
||||
return;
|
||||
}
|
||||
|
||||
Ref<EditorUndoRedoManager> undo_redo = EditorNode::get_undo_redo();
|
||||
Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
|
||||
undo_redo->create_action(TTR("Replace with Branch Scene"));
|
||||
|
||||
Node *parent = base->get_parent();
|
||||
@@ -3568,7 +3569,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
|
||||
|
||||
editor_selection->connect("selection_changed", callable_mp(this, &SceneTreeDock::_selection_changed));
|
||||
|
||||
scene_tree->set_undo_redo(editor_data->get_undo_redo());
|
||||
scene_tree->set_as_scene_tree_dock();
|
||||
scene_tree->set_editor_selection(editor_selection);
|
||||
|
||||
create_dialog = memnew(CreateDialog);
|
||||
|
||||
Reference in New Issue
Block a user