From e1798f4278a10de00d1d95e81031391f9ee16c61 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Tue, 21 May 2024 12:05:15 -0300 Subject: Fix unchecking theme overrides not creating an undo action --- editor/editor_inspector.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'editor/editor_inspector.cpp') diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 7c5e3877f2..a9f32927a8 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -3782,7 +3782,6 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo } emit_signal(_prop_edited, p_name); - } else if (Object::cast_to(object)) { Object::cast_to(object)->set_property_field(p_name, p_value, p_changed_field); _edit_request_change(object, p_name); @@ -3959,7 +3958,7 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) { //property checked if (autoclear) { if (!p_checked) { - object->set(p_path, Variant()); + _edit_set(p_path, Variant(), false, ""); } else { Variant to_create; List pinfo; @@ -3971,7 +3970,7 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) { break; } } - object->set(p_path, to_create); + _edit_set(p_path, to_create, false, ""); } if (editor_property_map.has(p_path)) { @@ -3982,7 +3981,6 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) { E->update_cache(); } } - } else { emit_signal(SNAME("property_toggled"), p_path, p_checked); } -- cgit v1.2.3