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:
Bastien Montagne
2014-02-28 10:04:57 +01:00
parent 96a51e99fb
commit d2a5ea04ed

View File

@@ -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