Fix: avoid extra depsgraph evaluation when stopping animation playback

The `NC_SCENE | ND_FRAME` was originally added so that the sequencer
preview is redrawn so that the fps stops showing (2855485565).

Using this specific notifier has the side effect that it also causes a depsgraph
update in `wm_event_do_notifiers`. However, that is not necessary just to
trigger the redraw. Using the `NC_SPACE | ND_SPACE_SEQUENCER` notifier
also triggers the redraw without causing a depsgraph update.
This commit is contained in:
Jacques Lucke
2023-05-08 11:26:12 +02:00
parent 8e9ada0079
commit d8388ef36a

View File

@@ -4863,7 +4863,9 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
ED_screen_animation_timer(C, 0, 0, 0);
BKE_sound_stop_scene(scene_eval);
WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene);
/* Triggers redraw of sequencer preview so that it does not show to fps anymore after stopping
* playback. */
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_SEQUENCER, scene);
}
else {
/* these settings are currently only available from a menu in the TimeLine */