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:
authorCampbell Barton <ideasman42@gmail.com>2019-02-25 08:51:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-25 08:52:20 +0300
commit012483b6e4a1453c3e990127db001617997a9d64 (patch)
treee11e44b33a767f1f296f3ab424c9d5b76df6504b /source/blender/editors/space_outliner/outliner_collections.c
parent9a311c58aa5994b743b73bcca10c6d4be7d8ac58 (diff)
Fix T60880: Assert deleting grease pencil object from outliner
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_collections.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index 8acda1f6f87..67126a3e155 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -42,6 +42,7 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "WM_message.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -263,8 +264,11 @@ static TreeTraversalAction collection_find_data_to_edit(TreeElement *te, void *c
static int collection_delete_exec(bContext *C, wmOperator *op)
{
+ struct wmMsgBus *mbus = CTX_wm_message_bus(C);
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ const Base *basact_prev = BASACT(view_layer);
SpaceOutliner *soops = CTX_wm_space_outliner(C);
struct CollectionEditData data = {.scene = scene, .soops = soops,};
bool hierarchy = RNA_boolean_get(op->ptr, "hierarchy");
@@ -292,6 +296,10 @@ static int collection_delete_exec(bContext *C, wmOperator *op)
WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL);
+ if (basact_prev != BASACT(view_layer)) {
+ WM_msg_publish_rna_prop(mbus, &scene->id, view_layer, LayerObjects, active);
+ }
+
return OPERATOR_FINISHED;
}