Fix T38467: Animation playback is not synchronized when Screen Layout changes
When both old and new screens share the same scene, "transfer" playback to new screen, else stop playback.
This commit is contained in:
@@ -1518,8 +1518,17 @@ void ED_screen_set(bContext *C, bScreen *sc)
|
||||
WM_event_timer_sleep(wm, win, wt, true);
|
||||
|
||||
ED_screen_exit(C, win, oldscreen);
|
||||
oldscreen->animtimer = wt;
|
||||
|
||||
|
||||
/* Same scene, "transfer" playback to new screen. */
|
||||
if (oldscene == sc->scene) {
|
||||
sc->animtimer = wt;
|
||||
}
|
||||
/* Else, stop playback. */
|
||||
else {
|
||||
oldscreen->animtimer = wt;
|
||||
ED_screen_animation_play(C, 0, 0);
|
||||
}
|
||||
|
||||
win->screen = sc;
|
||||
CTX_wm_window_set(C, win); // stores C->wm.screen... hrmf
|
||||
|
||||
|
||||
Reference in New Issue
Block a user