Merge pull request #87143 from ajreckof/fix-icon-corrupted-on-nested-arrays

Fix icon corrupted when nested array editors are opened before opening main array editor.
This commit is contained in:
Rémi Verschelde 2024-01-16 10:36:01 +01:00
commit db7175458a
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -407,8 +407,8 @@ void EditorPropertyArray::update_property() {
new_prop->connect(SNAME("object_id_selected"), callable_mp(this, &EditorPropertyArray::_object_id_selected));
new_prop->set_h_size_flags(SIZE_EXPAND_FILL);
new_prop->set_read_only(is_read_only());
callable_mp((Node *)slot.prop, &Node::add_sibling).call_deferred(new_prop, false);
callable_mp((Node *)slot.prop, &Node::queue_free).call_deferred();
slot.prop->add_sibling(new_prop, false);
slot.prop->queue_free();
slot.prop = new_prop;
slot.set_index(idx);
}