diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2018-01-03 13:24:05 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2018-01-03 13:24:05 +0300 |
commit | 36fac1e27ccc143a56bcf9ce35c236d5762e79fc (patch) | |
tree | 8def2e87a2c0f3905fde99af557b7a640dad9457 /source/blender/editors/space_buttons | |
parent | 2a7dfcd927c78d675bcde3d3ca9d417e0eae6704 (diff) | |
parent | 060fdb49d64857ff1cbf9937420ed70b10b17086 (diff) |
Merge branch 'blender2.8' into hair_guides
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 878feb81e8a..179780bf517 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -226,11 +226,12 @@ static void buttons_header_region_draw(const bContext *C, ARegion *ar) } static void buttons_header_region_message_subscribe( - const struct bContext *UNUSED(C), - struct WorkSpace *UNUSED(workspace), struct Scene *UNUSED(scene), - struct bScreen *UNUSED(screen), struct ScrArea *UNUSED(sa), struct ARegion *ar, + const bContext *UNUSED(C), + WorkSpace *UNUSED(workspace), Scene *UNUSED(scene), + bScreen *UNUSED(screen), ScrArea *sa, ARegion *ar, struct wmMsgBus *mbus) { + SpaceButs *sbuts = sa->spacedata.first; wmMsgSubscribeValue msg_sub_value_region_tag_redraw = { .owner = ar, .user_data = ar, @@ -240,6 +241,10 @@ static void buttons_header_region_message_subscribe( /* Don't check for SpaceButs.mainb here, we may toggle between view-layers * where one has no active object, so that available contexts changes. */ WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw); + + if (!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_WORLD)) { + WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw); + } } /* draw a certain button set only if properties area is currently |