Merge pull request #111606 from YeldhamDev/out_of_the_field

Fix error when editing multifield values inside arrays and dictionaries
This commit is contained in:
Thaddeus Crews 2025-11-10 08:20:24 -06:00
commit cfd2b37278
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
2 changed files with 14 additions and 2 deletions

View file

@ -337,7 +337,13 @@ StringName MultiNodeEdit::get_edited_class_name() const {
}
void MultiNodeEdit::set_property_field(const StringName &p_property, const Variant &p_value, const String &p_field) {
_set_impl(p_property, p_value, p_field);
// Ignore the field with arrays and dictionaries, as they are passed whole when edited.
Variant::Type type = p_value.get_type();
if (type == Variant::ARRAY || type == Variant::DICTIONARY) {
_set_impl(p_property, p_value, "");
} else {
_set_impl(p_property, p_value, p_field);
}
}
void MultiNodeEdit::_bind_methods() {