Fix #128966: Update Dopesheet playhead in separate window
The playhead is redrawn as an overlay, so instead of a full region redraw using `ARegionType.draw()`, at least an overlay only redraw using `ARegion.draw_overlay()` needs to be triggered. Any redrawing within a window is skipped if neither the screen, nor any of its areas or regions are tagged for redraw. So since there are no other areas or regions to be fully redrawn in this window, no redrawing will happen. The screen needs to be tagged for redraw, which will skip most drawing in this case, and just draw the overlays as wanted. Pull Request: https://projects.blender.org/blender/blender/pulls/134579
This commit is contained in:
committed by
Julian Eisel
parent
0425940794
commit
05c6446c38
@@ -5554,7 +5554,7 @@ static int screen_animation_step_invoke(bContext *C, wmOperator * /*op*/, const
|
||||
}
|
||||
|
||||
LISTBASE_FOREACH (wmWindow *, window, &wm->windows) {
|
||||
const bScreen *win_screen = WM_window_get_active_screen(window);
|
||||
bScreen *win_screen = WM_window_get_active_screen(window);
|
||||
|
||||
LISTBASE_FOREACH (ScrArea *, area, &win_screen->areabase) {
|
||||
LISTBASE_FOREACH (ARegion *, region, &area->regionbase) {
|
||||
@@ -5573,6 +5573,9 @@ static int screen_animation_step_invoke(bContext *C, wmOperator * /*op*/, const
|
||||
if (redraw) {
|
||||
screen_animation_region_tag_redraw(
|
||||
C, area, region, scene, eScreen_Redraws_Flag(sad->redraws));
|
||||
/* Doesn't trigger a full redraw of the screeen but makes sure at least overlay drawing
|
||||
* (#ARegionType.draw_overlay()) is triggered, which is how the playhead is drawn. */
|
||||
win_screen->do_draw = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user