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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-12-07 06:07:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-07 06:07:05 +0300
commita304ed1b014e4e0561b810d7dbaa8768b6713ac0 (patch)
tree519d8825ce1a4f3bc4ea1de72d70a9a2ab3ea250 /source
parent2fefbfd2d0ac715d4928318c8506eec3eb81dc88 (diff)
WM: alternate fix for T58904
Use messages instead of notifiers.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 1f1f238daf6..159757139fa 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -431,6 +431,21 @@ static void buttons_navigation_bar_region_draw(const bContext *C, ARegion *ar)
ED_region_panels_draw(C, ar);
}
+static void buttons_navigation_bar_region_message_subscribe(
+ const bContext *UNUSED(C),
+ WorkSpace *UNUSED(workspace), Scene *UNUSED(scene),
+ bScreen *UNUSED(screen), ScrArea *UNUSED(sa), ARegion *ar,
+ struct wmMsgBus *mbus)
+{
+ wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {
+ .owner = ar,
+ .user_data = ar,
+ .notify = ED_region_do_msg_notify_tag_redraw,
+ };
+
+ WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw);
+}
+
/* draw a certain button set only if properties area is currently
* showing that button set, to reduce unnecessary drawing. */
static void buttons_area_redraw(ScrArea *sa, short buttons)
@@ -732,6 +747,7 @@ void ED_spacetype_buttons(void)
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
art->init = buttons_navigation_bar_region_init;
art->draw = buttons_navigation_bar_region_draw;
+ art->message_subscribe = buttons_navigation_bar_region_message_subscribe;
BLI_addhead(&st->regiontypes, art);
BKE_spacetype_register(st);