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:
authorDalai Felinto <dfelinto@gmail.com>2017-04-25 19:43:53 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-04-25 19:44:17 +0300
commit00f5c621a65b6bc9847776b2542588835fb4054c (patch)
tree1b8c66395b8d8a94e85e2263a0e7a772ad03ee30 /source/blender/editors/space_outliner/outliner_ops.c
parent973f4944e08c449d68b43edf39d9cb2d209f4b7a (diff)
Outliner: Re-build depsgraph when reordering collections
Otherwise if we create a new collection, and drag a collection into it we either get a crash, or at the very least we dont get the visibility flags correct.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_ops.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_ops.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c
index 90d27b09292..5466ef1a9ed 100644
--- a/source/blender/editors/space_outliner/outliner_ops.c
+++ b/source/blender/editors/space_outliner/outliner_ops.c
@@ -29,6 +29,7 @@
*/
#include "BKE_context.h"
+#include "BKE_main.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
@@ -164,7 +165,7 @@ static void outliner_item_drag_handle(
te_dragged->drag_data->insert_handle = te_insert_handle;
}
-static bool outliner_item_drag_drop_apply(const Scene *scene, TreeElement *dragged_te)
+static bool outliner_item_drag_drop_apply(Main *bmain, const Scene *scene, TreeElement *dragged_te)
{
TreeElement *insert_handle = dragged_te->drag_data->insert_handle;
TreeElementInsertType insert_type = dragged_te->drag_data->insert_type;
@@ -178,7 +179,7 @@ static bool outliner_item_drag_drop_apply(const Scene *scene, TreeElement *dragg
/* call of assert above should not have changed insert_handle and insert_type at this point */
BLI_assert(dragged_te->drag_data->insert_handle == insert_handle &&
dragged_te->drag_data->insert_type == insert_type);
- dragged_te->reinsert(scene, dragged_te, insert_handle, insert_type);
+ dragged_te->reinsert(bmain, scene, dragged_te, insert_handle, insert_type);
return true;
}
@@ -187,6 +188,7 @@ static bool outliner_item_drag_drop_apply(const Scene *scene, TreeElement *dragg
static int outliner_item_drag_drop_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
ARegion *ar = CTX_wm_region(C);
SpaceOops *soops = CTX_wm_space_outliner(C);
@@ -198,7 +200,7 @@ static int outliner_item_drag_drop_modal(bContext *C, wmOperator *op, const wmEv
switch (event->type) {
case EVT_MODAL_MAP:
if (event->val == OUTLINER_ITEM_DRAG_CONFIRM) {
- if (outliner_item_drag_drop_apply(scene, te_dragged)) {
+ if (outliner_item_drag_drop_apply(bmain, scene, te_dragged)) {
skip_rebuild = false;
}
retval = OPERATOR_FINISHED;