Merge pull request from ajreckof/prevent_packedArray_cast_to_array

Prevent nested packedArray from being casted to generic Arrays
This commit is contained in:
Rémi Verschelde 2023-04-18 23:40:31 +02:00
commit df0ad7502d
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -203,8 +203,7 @@ void EditorPropertyArray::_property_changed(const String &p_property, Variant p_
index = p_property.get_slice("/", 1).to_int();
}
Array array;
array.assign(object->get_array().duplicate());
Variant array = object->get_array().duplicate();
array.set(index, p_value);
object->set_array(array);
emit_changed(get_edited_property(), array, "", true);