We were never removing the parent collection from a collection upon removal
of the parent.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D4099
{
for (CollectionParent *parent = collection->parents.first, *parent_next; parent != NULL; parent = parent_next) {
parent_next = parent->next;
-
- if (!collection_find_child(parent->collection, collection)) {
+ if ((parent->collection == NULL) ||
+ !collection_find_child(parent->collection, collection))
+ {
BLI_freelinkN(&collection->parents, parent);
}
}
for (CollectionChild *child = collection->children.first; child; child = child->next) {
CALLBACK_INVOKE(child->collection, IDWALK_CB_USER);
}
+ for (CollectionParent *parent = collection->parents.first; parent; parent = parent->next) {
+ CALLBACK_INVOKE(parent->collection, IDWALK_CB_NOP);
+ }
break;
}