diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-03 06:58:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-03 06:59:58 +0300 |
commit | 4a3a0e3ef59fe906bdac60163a8177f477dd9d65 (patch) | |
tree | 5e26ddaec8923cedb1d2eb93abe94e7c06a75e06 | |
parent | 70682d11b8a8b3bca327a309f2e1e8383b920387 (diff) |
Fix tool header message subscriber
-rw-r--r-- | source/blender/editors/screen/area.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 4 |
2 files changed, 3 insertions, 19 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 9a74ffc38d9..5fe6f98e968 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -457,19 +457,6 @@ void ED_area_do_msg_notify_tag_refresh( ED_area_tag_refresh(sa); } -static void region_do_msg_notify_tag_redraw( - /* Follow wmMsgNotifyFn spec */ - bContext *UNUSED(C), - wmMsgSubscribeKey *UNUSED(msg_key), - wmMsgSubscribeValue *msg_val) -{ - ARegion *ar = msg_val->owner; - ED_region_tag_redraw(ar); - - /* FIXME(campbell): shouldn't be needed. */ - WM_main_add_notifier(NC_SPACE | ND_SPACE_VIEW3D, NULL); -} - void ED_area_do_mgs_subscribe_for_tool_header( /* Follow ARegionType.message_subscribe */ const struct bContext *UNUSED(C), @@ -483,10 +470,7 @@ void ED_area_do_mgs_subscribe_for_tool_header( wmMsgSubscribeValue msg_sub_value_region_tag_redraw = { .owner = ar, .user_data = ar, - /* TODO(campbell): investigate why - * ED_region_do_msg_notify_tag_redraw doesn't work here. */ - // .notify = ED_region_do_msg_notify_tag_redraw, - .notify = region_do_msg_notify_tag_redraw, + .notify = ED_region_do_msg_notify_tag_redraw, }; WM_msg_subscribe_rna_prop( mbus, &workspace->id, workspace, WorkSpace, tools, &msg_sub_value_region_tag_redraw); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 9ee7bb3066d..e7a7d2041a3 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -1537,7 +1537,7 @@ void ED_spacetype_view3d(void) art->listener = view3d_header_region_listener; art->init = view3d_header_region_init; art->draw = view3d_header_region_draw; - art->message_subscribe = view3d_header_region_message_subscribe; + art->message_subscribe = ED_area_do_mgs_subscribe_for_tool_header; BLI_addhead(&st->regiontypes, art); /* regions: header */ @@ -1548,7 +1548,7 @@ void ED_spacetype_view3d(void) art->listener = view3d_header_region_listener; art->init = view3d_header_region_init; art->draw = view3d_header_region_draw; - art->message_subscribe = ED_area_do_mgs_subscribe_for_tool_header; + art->message_subscribe = view3d_header_region_message_subscribe; BLI_addhead(&st->regiontypes, art); /* regions: hud */ |