Touch properties when clearing/adding to a collection.

Fixes an issue when adding several movie strips fails
second time in sequencer.
This commit is contained in:
Sergey Sharybin 2013-04-15 16:24:35 +00:00
parent 49649a3f7b
commit 24ef6f7add

@ -2871,6 +2871,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
IDP_AppendArray(idprop, item);
/* IDP_FreeProperty(item); *//* IDP_AppendArray does a shallow copy (memcpy), only free memory */
MEM_freeN(item);
rna_idproperty_touch(idprop);
}
else if (prop->flag & PROP_IDPROPERTY) {
IDProperty *group, *item;
@ -3001,8 +3002,10 @@ void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop)
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
if ((idprop = rna_idproperty_check(&prop, ptr)))
if ((idprop = rna_idproperty_check(&prop, ptr))) {
IDP_ResizeIDPArray(idprop, 0);
rna_idproperty_touch(idprop);
}
}
int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *t_ptr)