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:
authorTon Roosendaal <ton@blender.org>2008-12-27 20:43:05 +0300
committerTon Roosendaal <ton@blender.org>2008-12-27 20:43:05 +0300
commitb97ee36f8dc1cd12039d5cbd317cb32be43a59ef (patch)
treef885803b33b7436427485b9c9bd1392e57223a52 /source/blender/editors/space_buttons/space_buttons.c
parentb7c7057f3e876cd0f964e2badc43e0b9a5e25d3b (diff)
2.5
Anim playback part 1 (needs more test, will do after commit) - added the update_for_new_frame() back - proper evaluation of time change notifier in WM level - fixed redraw flushes for menus while animation plays.
Diffstat (limited to 'source/blender/editors/space_buttons/space_buttons.c')
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index d22e2943670..1b6e134ca96 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -230,9 +230,19 @@ static void buttons_header_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
}
-static void buttons_main_area_listener(ARegion *ar, wmNotifier *wmn)
+/* reused! */
+static void buttons_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
+ switch(wmn->category) {
+ case NC_SCENE:
+ switch(wmn->data) {
+ case ND_FRAME:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
+ }
}
/* only called once, from space/spacetypes.c */
@@ -255,7 +265,7 @@ void ED_spacetype_buttons(void)
art->regionid = RGN_TYPE_WINDOW;
art->init= buttons_main_area_init;
art->draw= buttons_main_area_draw;
- art->listener= buttons_main_area_listener;
+ art->listener= buttons_area_listener;
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
BLI_addhead(&st->regiontypes, art);
@@ -268,7 +278,7 @@ void ED_spacetype_buttons(void)
art->init= buttons_header_area_init;
art->draw= buttons_header_area_draw;
-
+ art->listener= buttons_area_listener;
BLI_addhead(&st->regiontypes, art);
/* regions: channels */