diff options
author | kobewi <kobewi4e@gmail.com> | 2022-12-23 23:53:16 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-01-16 01:11:52 +0100 |
commit | b58111588a62fcdd238f93129cd48a1dbb1d5237 (patch) | |
tree | 25c5154a456d471932ca9d27ff46dd0aec663665 /editor/array_property_edit.cpp | |
parent | 91fedb60de6011434938499a9d4a7d4fd1cd4f06 (diff) | |
download | redot-engine-b58111588a62fcdd238f93129cd48a1dbb1d5237.tar.gz |
Add EditorUndoRedoManager singleton
Diffstat (limited to 'editor/array_property_edit.cpp')
-rw-r--r-- | editor/array_property_edit.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp index b2e12e2409..dd27b61df9 100644 --- a/editor/array_property_edit.cpp +++ b/editor/array_property_edit.cpp @@ -31,7 +31,6 @@ #include "array_property_edit.h" #include "core/io/marshalls.h" -#include "editor/editor_node.h" #include "editor/editor_undo_redo_manager.h" #define ITEMS_PER_PAGE 100 @@ -88,7 +87,7 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) { return true; } - Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo(); + EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton(); ur->create_action(TTR("Resize Array")); ur->add_do_method(this, "_set_size", newsize); ur->add_undo_method(this, "_set_size", size); @@ -135,7 +134,7 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) { Callable::CallError ce; Variant new_value; Variant::construct(Variant::Type(type), new_value, nullptr, 0, ce); - Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo(); + EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton(); ur->create_action(TTR("Change Array Value Type")); ur->add_do_method(this, "_set_value", idx, new_value); @@ -151,7 +150,7 @@ bool ArrayPropertyEdit::_set(const StringName &p_name, const Variant &p_value) { Variant arr = get_array(); Variant value = arr.get(idx); - Ref<EditorUndoRedoManager> &ur = EditorNode::get_undo_redo(); + EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton(); ur->create_action(TTR("Change Array Value")); ur->add_do_method(this, "_set_value", idx, p_value); |