Fix T86809: Action Editor header not display the right action in certain scenarios

If a new action is created (e.g. by inserting keyframes), the header was
not garuanteed to display the right action.
Notifiers were fine here, redraw took place, the editors action was just
not set soon enough for the drawing.

Now make sure this is set correctly by ensuring the animation context is
right (same as the other editor regions do before drawing).

Maniphest Tasks: T86809

Differential Revision: https://developer.blender.org/D10796
This commit is contained in:
Philipp Oeser 2021-03-23 09:41:48 +01:00
parent 72fec0f7c5
commit db0b1cab1f
Notes: blender-bot 2023-02-13 23:16:02 +01:00
Referenced by issue #86809, Action Editor doesn't update until highlighted
1 changed files with 5 additions and 0 deletions

View File

@ -301,6 +301,11 @@ static void action_header_region_init(wmWindowManager *UNUSED(wm), ARegion *regi
static void action_header_region_draw(const bContext *C, ARegion *region)
{
/* The anim context is not actually used, but this makes sure the action being displayed is up to
* date. */
bAnimContext ac;
ANIM_animdata_get_context(C, &ac);
ED_region_header(C, region);
}