summaryrefslogtreecommitdiffstats
path: root/editor/plugins/sprite_frames_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-08-22 22:37:33 +0200
committerGitHub <noreply@github.com>2022-08-22 22:37:33 +0200
commitb8a64313f0675a7e781e21b530a43d824651f44d (patch)
treeaaa24e4d70cbc2135edade0780650c8c666fc196 /editor/plugins/sprite_frames_editor_plugin.cpp
parent9c567a0604f1cedcce3dfa1a707d3671c51a0155 (diff)
parentece3df39386af85b069cbb67ae1893b4365f1bd3 (diff)
downloadredot-engine-b8a64313f0675a7e781e21b530a43d824651f44d.tar.gz
Merge pull request #59564 from KoBeWi/FINALLY,_ULTIMATE_UNDO_REDO
Diffstat (limited to 'editor/plugins/sprite_frames_editor_plugin.cpp')
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index a39d24a167..205fed48b4 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_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/scene_tree_dock.h"
#include "scene/3d/sprite_3d.h"
#include "scene/gui/center_container.h"
@@ -1010,6 +1011,10 @@ void SpriteFramesEditor::edit(SpriteFrames *p_frames) {
}
}
+void SpriteFramesEditor::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) {
+ undo_redo = p_undo_redo;
+}
+
Variant SpriteFramesEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
if (!frames->has_animation(edited_anim)) {
return false;
@@ -1471,7 +1476,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
}
void SpriteFramesEditorPlugin::edit(Object *p_object) {
- frames_editor->set_undo_redo(&get_undo_redo());
+ frames_editor->set_undo_redo(get_undo_redo());
SpriteFrames *s;
AnimatedSprite2D *animated_sprite = Object::cast_to<AnimatedSprite2D>(p_object);