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/plugins/gradient_editor_plugin.cpp | |
parent | 99548e521dc049b609347cd1fe38262d59d1b0d6 (diff) | |
download | redot-engine-ece3df39386af85b069cbb67ae1893b4365f1bd3.tar.gz |
Add per-scene UndoRedo
Diffstat (limited to 'editor/plugins/gradient_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/gradient_editor_plugin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp index 542aee879b..460178490e 100644 --- a/editor/plugins/gradient_editor_plugin.cpp +++ b/editor/plugins/gradient_editor_plugin.cpp @@ -34,6 +34,7 @@ #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" +#include "editor/editor_undo_redo_manager.h" #include "node_3d_editor_plugin.h" Size2 GradientEditor::get_minimum_size() const { @@ -55,7 +56,7 @@ void GradientEditor::_gradient_changed() { void GradientEditor::_ramp_changed() { editing = true; - UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo(); + Ref<EditorUndoRedoManager> undo_redo = EditorNode::get_undo_redo(); undo_redo->create_action(TTR("Gradient Edited"), UndoRedo::MERGE_ENDS); undo_redo->add_do_method(gradient.ptr(), "set_offsets", get_offsets()); undo_redo->add_do_method(gradient.ptr(), "set_colors", get_colors()); |