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:
authorJulian Eisel <eiseljulian@gmail.com>2017-12-27 19:08:00 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-12-27 19:08:00 +0300
commit7dee0bbf066108dca64e9df5cb3da24f40ef0989 (patch)
tree93c1d7ab20bf7897c2d45e4b5f0c34af1456c8c8 /source/blender/editors/space_info/space_info.c
parent110373de6a52a20eb759aea9a11e4c45fcdb619b (diff)
Fix missing redraws when changing active view-layer or its name
Also removed unnecessary `struct` keywords.
Diffstat (limited to 'source/blender/editors/space_info/space_info.c')
-rw-r--r--source/blender/editors/space_info/space_info.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 4f042364c63..b13152883c3 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -50,6 +50,9 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "WM_message.h"
+
+#include "RNA_access.h"
#include "UI_resources.h"
#include "UI_interface.h"
@@ -284,6 +287,22 @@ static void info_header_listener(
}
+static void info_header_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);
+ WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw);
+}
+
static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
{
struct RecentFile *recent;
@@ -347,6 +366,7 @@ void ED_spacetype_info(void)
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER;
art->listener = info_header_listener;
+ art->message_subscribe = info_header_region_message_subscribe;
art->init = info_header_region_init;
art->draw = info_header_region_draw;