From 72f4394d8cec115d8d3032e57babab5eceeb1f2b Mon Sep 17 00:00:00 2001 From: ajreckof Date: Thu, 5 Sep 2024 21:31:24 +0200 Subject: [PATCH] avoid bubbling up changed notification when on new item/key of dictionaries to avoid inspector whipeout. --- editor/editor_properties_array_dict.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index f5d016629f76..6adb78aa8768 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -869,7 +869,11 @@ void EditorPropertyDictionary::_property_changed(const String &p_property, Varia } object->set(p_property, p_value); - emit_changed(get_edited_property(), object->get_dict(), p_name, p_changing); + bool new_item_or_key = !p_property.begins_with("indices"); + emit_changed(get_edited_property(), object->get_dict(), p_name, p_changing || new_item_or_key); + if (new_item_or_key) { + update_property(); + } } void EditorPropertyDictionary::_change_type(Object *p_button, int p_slot_index) {