diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/screen/area.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 21 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 2 |
4 files changed, 27 insertions, 5 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index a248de22e68..a2527bd9d15 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -125,12 +125,12 @@ void ED_region_do_listen(ARegion *ar, wmNotifier *note) case NC_SCREEN: if(note->action==NA_EDITED) ED_region_tag_redraw(ar); - /* pass on */ + break; #endif - default: - if(ar->type && ar->type->listener) - ar->type->listener(ar, note); } + + if(ar->type && ar->type->listener) + ar->type->listener(ar, note); } /* only exported for WM */ diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 869d0c45f2f..bda7dfcabf1 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -770,6 +770,25 @@ static void view3d_tools_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, 1, CTX_data_mode_string(C), -1); } +static void view3d_props_area_listener(ARegion *ar, wmNotifier *wmn) +{ + /* context changes */ + switch(wmn->category) { + case NC_WM: + if(wmn->data == ND_HISTORY) + ED_region_tag_redraw(ar); + break; + case NC_SCENE: + if(wmn->data == ND_MODE) + ED_region_tag_redraw(ar); + break; + case NC_SPACE: + if(wmn->data == ND_SPACE_VIEW3D) + ED_region_tag_redraw(ar); + break; + } +} + static int view3d_context(const bContext *C, const char *member, bContextDataResult *result) { View3D *v3d= CTX_wm_view3d(C); @@ -952,7 +971,7 @@ void ED_spacetype_view3d(void) art->prefsizex= 0; art->prefsizey= 120; art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; - art->listener= view3d_buttons_area_listener; + art->listener= view3d_props_area_listener; art->init= view3d_tools_area_init; art->draw= view3d_tools_area_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 78b19db5fc8..1bede614732 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -157,6 +157,7 @@ typedef struct wmNotifier { #define ND_FILEREAD (1<<16) #define ND_FILESAVE (2<<16) #define ND_DATACHANGED (3<<16) +#define ND_HISTORY (4<<16) /* NC_SCREEN screen */ #define ND_SCREENBROWSE (1<<16) diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index cfeccfd7f62..39c5e69d982 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -124,6 +124,7 @@ void wm_operator_register(bContext *C, wmOperator *op) /* so the console is redrawn */ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL); + WM_event_add_notifier(C, NC_WM|ND_HISTORY, NULL); } @@ -137,6 +138,7 @@ void WM_operator_stack_clear(bContext *C) WM_operator_free(op); } + WM_event_add_notifier(C, NC_WM|ND_HISTORY, NULL); } /* ****************************************** */ |