diff options
author | kobewi <kobewi4e@gmail.com> | 2022-03-25 18:06:46 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2022-08-22 18:05:10 +0200 |
commit | ece3df39386af85b069cbb67ae1893b4365f1bd3 (patch) | |
tree | 6d815d51c6e043470a08ad1eab993e4b288da8c9 /editor/rename_dialog.cpp | |
parent | 99548e521dc049b609347cd1fe38262d59d1b0d6 (diff) | |
download | redot-engine-ece3df39386af85b069cbb67ae1893b4365f1bd3.tar.gz |
Add per-scene UndoRedo
Diffstat (limited to 'editor/rename_dialog.cpp')
-rw-r--r-- | editor/rename_dialog.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp index 665aca6a37..84923a94a2 100644 --- a/editor/rename_dialog.cpp +++ b/editor/rename_dialog.cpp @@ -38,6 +38,7 @@ #include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/editor_themes.h" +#include "editor/editor_undo_redo_manager.h" #include "modules/regex/regex.h" #include "plugins/script_editor_plugin.h" #include "scene/gui/control.h" @@ -45,7 +46,7 @@ #include "scene/gui/separator.h" #include "scene/gui/tab_container.h" -RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, UndoRedo *p_undo_redo) { +RenameDialog::RenameDialog(SceneTreeEditor *p_scene_tree_editor, Ref<EditorUndoRedoManager> p_undo_redo) { scene_tree_editor = p_scene_tree_editor; undo_redo = p_undo_redo; preview_node = nullptr; @@ -581,7 +582,7 @@ void RenameDialog::rename() { // Forward recursive as opposed to the actual renaming. _iterate_scene(root_node, selected_node_list, &global_count); - if (undo_redo && !to_rename.is_empty()) { + if (undo_redo.is_valid() && !to_rename.is_empty()) { undo_redo->create_action(TTR("Batch Rename")); // Make sure to iterate reversed so that child nodes will find parents. |