Skip to content

Commit 72f4394

Browse files
committed
avoid bubbling up changed notification when on new item/key of dictionaries to avoid inspector whipeout.
1 parent 835808e commit 72f4394

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

editor/editor_properties_array_dict.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,11 @@ void EditorPropertyDictionary::_property_changed(const String &p_property, Varia
869869
}
870870

871871
object->set(p_property, p_value);
872-
emit_changed(get_edited_property(), object->get_dict(), p_name, p_changing);
872+
bool new_item_or_key = !p_property.begins_with("indices");
873+
emit_changed(get_edited_property(), object->get_dict(), p_name, p_changing || new_item_or_key);
874+
if (new_item_or_key) {
875+
update_property();
876+
}
873877
}
874878

875879
void EditorPropertyDictionary::_change_type(Object *p_button, int p_slot_index) {

0 commit comments

Comments
 (0)