Fix #127213: crash on undo after unlinking an object in the outliner

This commit is contained in:
Campbell Barton
2024-09-06 11:45:13 +10:00
parent 97179b10fb
commit f5b16e474f

View File

@@ -460,6 +460,7 @@ static void unlink_object_fn(bContext *C,
case ID_GR: {
Collection *parent = (Collection *)tsep->id;
BKE_collection_object_remove(bmain, parent, ob, true);
DEG_id_tag_update(&parent->id, ID_RECALC_SYNC_TO_EVAL);
break;
}
case ID_SCE: {
@@ -478,6 +479,7 @@ static void unlink_object_fn(bContext *C,
else {
Collection *parent = scene->master_collection;
BKE_collection_object_remove(bmain, parent, ob, true);
DEG_id_tag_update(&parent->id, ID_RECALC_SYNC_TO_EVAL);
}
break;
}