[Bf-blender-cvs] [b3bcbc9e85a] blender2.8: Fix T53442: Outliner refresh issues when adding new collection
Dalai Felinto
noreply at git.blender.org
Tue Dec 19 17:33:38 CET 2017
Commit: b3bcbc9e85aaad3c6262e8203c69d4089d5d8154
Author: Dalai Felinto
Date: Tue Dec 19 14:29:44 2017 -0200
Branches: blender2.8
https://developer.blender.org/rBb3bcbc9e85aaad3c6262e8203c69d4089d5d8154
Fix T53442: Outliner refresh issues when adding new collection
Notifier is getting through, yet tree wasn't rebuilding until
we force redraw by resizing the outliner.
Thanks to Danrae Pray (@spockTheGray) for looking at this issue.
===================================================================
M source/blender/editors/space_outliner/outliner_collections.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index 0a51b1a0d69..05e7755209b 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -306,12 +306,14 @@ void OUTLINER_OT_collection_unlink(wmOperatorType *ot)
static int collection_new_exec(bContext *C, wmOperator *UNUSED(op))
{
+ SpaceOops *soops = CTX_wm_space_outliner(C);
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
SceneCollection *scene_collection = BKE_collection_add(&scene->id, NULL, COLLECTION_TYPE_NONE, NULL);
BKE_collection_link(view_layer, scene_collection);
+ outliner_cleanup_tree(soops);
DEG_relations_tag_update(bmain);
WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL);
return OPERATOR_FINISHED;
More information about the Bf-blender-cvs
mailing list