From efb240626254b7a6cedaa801acfba9bee5a41485 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 16 Aug 2023 12:22:55 +0200 Subject: [PATCH] Fix #111165: Regression: Blender Crashes On Scene Switch The root of the issue is a missing recalculation tag after changing collection content. Pull Request: https://projects.blender.org/blender/blender/pulls/111175 --- source/blender/editors/space_outliner/outliner_dragdrop.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.cc b/source/blender/editors/space_outliner/outliner_dragdrop.cc index 61d0288f0e1..460ad668924 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.cc +++ b/source/blender/editors/space_outliner/outliner_dragdrop.cc @@ -1367,12 +1367,13 @@ static int collection_drop_invoke(bContext *C, wmOperator * /*op*/, const wmEven } if (from) { - DEG_id_tag_update(&from->id, ID_RECALC_COPY_ON_WRITE | ID_RECALC_GEOMETRY); + DEG_id_tag_update(&from->id, + ID_RECALC_COPY_ON_WRITE | ID_RECALC_GEOMETRY | ID_RECALC_HIERARCHY); } } /* Update dependency graph. */ - DEG_id_tag_update(&data.to->id, ID_RECALC_COPY_ON_WRITE); + DEG_id_tag_update(&data.to->id, ID_RECALC_COPY_ON_WRITE | ID_RECALC_HIERARCHY); DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene);