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>2018-05-30 23:07:07 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-30 23:16:13 +0300
commit84e5c981dc8915caa75b60d101d94ed7ac0a0670 (patch)
treecdce1a40bdc73cefea57d93fa83bff2319a9af9b /source/blender/editors/space_image
parentf5f25b843ee0edd559187abcfaf4fefbf1901d86 (diff)
UI: toolbars now redraw on tool change
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/space_image.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index c303a78594d..586f27eb462 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -72,6 +72,7 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "WM_message.h"
#include "UI_resources.h"
#include "UI_interface.h"
@@ -979,6 +980,21 @@ static void image_tools_region_listener(
}
}
+static void image_tools_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,
+ 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, WorkSpace, tools, &msg_sub_value_region_tag_redraw);
+}
+
+
/************************* header region **************************/
/* add handlers, stuff you only do once or on area/region changes */
@@ -1100,6 +1116,7 @@ void ED_spacetype_image(void)
art->prefsizex = 220; // XXX
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
art->listener = image_tools_region_listener;
+ art->message_subscribe = image_tools_region_message_subscribe;
art->init = image_tools_region_init;
art->draw = image_tools_region_draw;
BLI_addhead(&st->regiontypes, art);