summaryrefslogtreecommitdiff
path: root/editor/editor_inspector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_inspector.cpp')
-rw-r--r--editor/editor_inspector.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 9de8b0451a..b3ce11028b 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -2243,6 +2243,13 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
undo_redo->add_do_property(object, p_name, p_value);
undo_redo->add_undo_property(object, p_name, object->get(p_name));
+ PropertyInfo prop_info;
+ if (ClassDB::get_property_info(object->get_class_name(), p_name, &prop_info)) {
+ for (const String &linked_prop : prop_info.linked_properties) {
+ undo_redo->add_undo_property(object, linked_prop, object->get(linked_prop));
+ }
+ }
+
Variant v_undo_redo = (Object *)undo_redo;
Variant v_object = object;
Variant v_name = p_name;