Skip to content

Commit 7d18547

Browse files
committed
Merge pull request godotengine#96623 from ajreckof/avoid-bubbling-up-changed-notification-when-on-new-item/key-of-dictionaries-to-avoid-inspector-whipeout-
Avoid bubbling up changed notification when on new item/key of dictionaries to avoid inspector wipeout.
2 parents 1c0bff5 + 72f4394 commit 7d18547

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
@@ -952,7 +952,11 @@ void EditorPropertyDictionary::_property_changed(const String &p_property, Varia
952952
}
953953

954954
object->set(p_property, p_value);
955-
emit_changed(get_edited_property(), object->get_dict(), p_name, p_changing);
955+
bool new_item_or_key = !p_property.begins_with("indices");
956+
emit_changed(get_edited_property(), object->get_dict(), p_name, p_changing || new_item_or_key);
957+
if (new_item_or_key) {
958+
update_property();
959+
}
956960
}
957961

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

0 commit comments

Comments
 (0)