UI: keep live previews updating during rapid edits

This commit is contained in:
cdinhoo
2026-10-09 19:06:17 +03:00
parent f08d090cd8
commit e445877494
5 changed files with 262 additions and 11 deletions
+1 -1
View File
@@ -641,7 +641,7 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) {
let frame = comp.frame_rate.frame_at(time);
let key = app.frame_key(cid, frame, scale);
app.request_frame_urgent(cid, frame, scale);
if let Some(img) = app.frames.get(&key) {
if let Some((key, img)) = app.frames.get_for_viewer(&key, app.viewer_shown.as_ref().map(|(_, k)| k)) {
let stale = app.viewer_shown.as_ref().is_none_or(|(_, k)| *k != key);
if stale {
show_frame(app, &ctx, key, img);