Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <mail@jlucke.com>2018-10-19 15:30:39 +0300
committerJacques Lucke <mail@jlucke.com>2018-10-19 15:30:39 +0300
commitc17f2c2eb61f387c278a8dbc8ec559fc1d4bcad6 (patch)
treec4f141eca9becb078524bf5081088ca4c6b23554 /source/blender/editors/space_outliner/outliner_dragdrop.c
parentbdd02cc082e5f16935f2ed9fbafe63f8aed2822a (diff)
Outliner: Open empty collection when something is dragged into it
Reviewers: brecht Differential Revision: https://developer.blender.org/D3814
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_dragdrop.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_dragdrop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c
index 293c1d5f29c..4a1e720fe2a 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.c
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.c
@@ -794,6 +794,10 @@ static int collection_drop_invoke(bContext *C, wmOperator *UNUSED(op), const wmE
return OPERATOR_CANCELLED;
}
+ if (BKE_collection_is_empty(data.to)) {
+ TREESTORE(data.te)->flag &= ~TSE_CLOSED;
+ }
+
for (wmDragID *drag_id = drag->ids.first; drag_id; drag_id = drag_id->next) {
/* Ctrl enables linking, so we don't need a from collection then. */
Collection *from = (event->ctrl) ? NULL : collection_parent_from_ID(drag_id->from_parent);