From ece3df39386af85b069cbb67ae1893b4365f1bd3 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 25 Mar 2022 18:06:46 +0100 Subject: Add per-scene UndoRedo --- modules/gridmap/editor/grid_map_editor_plugin.cpp | 1 + modules/gridmap/editor/grid_map_editor_plugin.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/gridmap') diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp index 7471bae093..17f9832096 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.cpp +++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp @@ -37,6 +37,7 @@ #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" +#include "editor/editor_undo_redo_manager.h" #include "editor/plugins/node_3d_editor_plugin.h" #include "scene/3d/camera_3d.h" #include "scene/main/window.h" diff --git a/modules/gridmap/editor/grid_map_editor_plugin.h b/modules/gridmap/editor/grid_map_editor_plugin.h index 3b29397502..a64dc4a80b 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.h +++ b/modules/gridmap/editor/grid_map_editor_plugin.h @@ -39,6 +39,7 @@ #include "scene/gui/slider.h" #include "scene/gui/spin_box.h" +class EditorUndoRedoManager; class Node3DEditorPlugin; class GridMapEditor : public VBoxContainer { @@ -62,7 +63,7 @@ class GridMapEditor : public VBoxContainer { DISPLAY_LIST }; - UndoRedo *undo_redo = nullptr; + Ref undo_redo; InputAction input_action = INPUT_NONE; Panel *panel = nullptr; MenuButton *options = nullptr; -- cgit v1.2.3