diff options
author | Joshua Leung <aligorith@gmail.com> | 2012-06-11 08:13:39 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2012-06-11 08:13:39 +0400 |
commit | c2e55ae8e31262eefe7f3f4cd951bdef187baaef (patch) | |
tree | 2bf071c097003914eca71acac29f94568461ca13 /source/blender/editors/space_action | |
parent | a050d23133123abec1ee83c1e80289f6ac931098 (diff) |
Bugfix [#28962] Changing actions via undo/delete all keyframes lacks UI refresh
Slightly hacky fix to get updates working for Action Editor header when there
are changes of the active action (via undo and/or deleting all keyframes at
once). Since the action referenced by the editor only gets updated when anim
channel filtering (e.g. as a result of the channel syncing operation) is
invoked. Added comments noting where these updates actually occur
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r-- | source/blender/editors/space_action/space_action.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index c8660179945..db1d4ed1155 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -435,6 +435,12 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn) break; } break; + case NC_WINDOW: + if (saction->flag & SACTION_TEMP_NEEDCHANSYNC) { + /* force redraw/refresh after undo/redo - [#28962] */ + ED_area_tag_refresh(sa); + } + break; } } @@ -464,9 +470,21 @@ static void action_refresh(const bContext *C, ScrArea *sa) * NOTE: the temp flag is used to indicate when this needs to be done, and will be cleared once handled */ if (saction->flag & SACTION_TEMP_NEEDCHANSYNC) { + ARegion *ar; + + /* Perform syncing of channel state incl. selection + * Active action setting also occurs here (as part of anim channel filtering in anim_filter.c) + */ ANIM_sync_animchannels_to_data(C); saction->flag &= ~SACTION_TEMP_NEEDCHANSYNC; + + /* Tag everything for redraw + * - Regions (such as header) need to be manually tagged for redraw too + * or else they don't update [#28962] + */ ED_area_tag_redraw(sa); + for (ar = sa->regionbase.first; ar; ar = ar->next) + ED_region_tag_redraw(ar); } /* region updates? */ |