diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp index e1beea1a150..013a6465a78 100644 --- a/core/undo_redo.cpp +++ b/core/undo_redo.cpp @@ -31,6 +31,7 @@ #include "undo_redo.h" #include "core/os/os.h" +#include "core/resource.h" void UndoRedo::_discard_redo() { if (current_action == actions.size() - 1) { @@ -104,8 +105,8 @@ void UndoRedo::add_do_method(Object *p_object, const String &p_method, VARIANT_A ERR_FAIL_COND((current_action + 1) >= actions.size()); Operation do_op; do_op.object = p_object->get_instance_id(); - if (Object::cast_to(p_object)) { - do_op.resref = Ref(Object::cast_to(p_object)); + if (Object::cast_to(p_object)) { + do_op.ref = Ref(Object::cast_to(p_object)); } do_op.type = Operation::TYPE_METHOD; @@ -130,8 +131,8 @@ void UndoRedo::add_undo_method(Object *p_object, const String &p_method, VARIANT Operation undo_op; undo_op.object = p_object->get_instance_id(); - if (Object::cast_to(p_object)) { - undo_op.resref = Ref(Object::cast_to(p_object)); + if (Object::cast_to(p_object)) { + undo_op.ref = Ref(Object::cast_to(p_object)); } undo_op.type = Operation::TYPE_METHOD; @@ -148,8 +149,8 @@ void UndoRedo::add_do_property(Object *p_object, const String &p_property, const ERR_FAIL_COND((current_action + 1) >= actions.size()); Operation do_op; do_op.object = p_object->get_instance_id(); - if (Object::cast_to(p_object)) { - do_op.resref = Ref(Object::cast_to(p_object)); + if (Object::cast_to(p_object)) { + do_op.ref = Ref(Object::cast_to(p_object)); } do_op.type = Operation::TYPE_PROPERTY; @@ -169,8 +170,8 @@ void UndoRedo::add_undo_property(Object *p_object, const String &p_property, con Operation undo_op; undo_op.object = p_object->get_instance_id(); - if (Object::cast_to(p_object)) { - undo_op.resref = Ref(Object::cast_to(p_object)); + if (Object::cast_to(p_object)) { + undo_op.ref = Ref(Object::cast_to(p_object)); } undo_op.type = Operation::TYPE_PROPERTY; @@ -184,8 +185,8 @@ void UndoRedo::add_do_reference(Object *p_object) { ERR_FAIL_COND((current_action + 1) >= actions.size()); Operation do_op; do_op.object = p_object->get_instance_id(); - if (Object::cast_to(p_object)) { - do_op.resref = Ref(Object::cast_to(p_object)); + if (Object::cast_to(p_object)) { + do_op.ref = Ref(Object::cast_to(p_object)); } do_op.type = Operation::TYPE_REFERENCE; @@ -203,8 +204,8 @@ void UndoRedo::add_undo_reference(Object *p_object) { Operation undo_op; undo_op.object = p_object->get_instance_id(); - if (Object::cast_to(p_object)) { - undo_op.resref = Ref(Object::cast_to(p_object)); + if (Object::cast_to(p_object)) { + undo_op.ref = Ref(Object::cast_to(p_object)); } undo_op.type = Operation::TYPE_REFERENCE; diff --git a/core/undo_redo.h b/core/undo_redo.h index 93791f6e57b..c71a51848bf 100644 --- a/core/undo_redo.h +++ b/core/undo_redo.h @@ -31,8 +31,7 @@ #ifndef UNDO_REDO_H #define UNDO_REDO_H -#include "core/object.h" -#include "core/resource.h" +#include "core/reference.h" class UndoRedo : public Object { GDCLASS(UndoRedo, Object); @@ -61,7 +60,7 @@ private: }; Type type; - Ref resref; + Ref ref; ObjectID object; String name; Variant args[VARIANT_ARG_MAX];