From 149ca6ec1b17030e99a7de7705a482a76414b781 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 27 Nov 2026 19:41:29 +0000 Subject: [PATCH] The animation preview clock reads the frame's time once, in its input pass; a JPEG export ignores the transparent-background option as production does; browser-save tests follow a request's suggested folder Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/app.rs | 4 +++- crates/ui-egui/src/app/files.rs | 3 --- crates/ui-egui/src/tests.rs | 5 ++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index d42b28fa1..bd7e18795 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -402,9 +402,11 @@ impl SlideApp { self.sync_backstage(); self.keyboard(&ctx); self.sync_backstage(); + // The preview clock reads the frame's time once, in the pass that receives the frame's input; a rerun pass of + // the same frame shows the same moment. if self.show.is_some() { self.anim_preview = None; - } else if self.tick_anim_preview(ctx.input(|i| i.time)) { + } else if ctx.current_pass_index() == 0 && self.tick_anim_preview(ctx.input(|i| i.time)) { ctx.request_repaint(); } let show_page = self.show.is_some(); diff --git a/crates/ui-egui/src/app/files.rs b/crates/ui-egui/src/app/files.rs index ed6470974..9d1f2791a 100644 --- a/crates/ui-egui/src/app/files.rs +++ b/crates/ui-egui/src/app/files.rs @@ -240,9 +240,6 @@ impl SlideApp { let files = match format { "png" | "jpeg" => { let transparent = extra.get("transparentBackground").and_then(Value::as_bool).unwrap_or(false); - if transparent && format != "png" { - return self.file_failure("A transparent background is for PNG export".into()); - } web_image_files(&doc, slide, all, &title, ext, transparent) } _ => { diff --git a/crates/ui-egui/src/tests.rs b/crates/ui-egui/src/tests.rs index 871349ab5..c7b469eba 100644 --- a/crates/ui-egui/src/tests.rs +++ b/crates/ui-egui/src/tests.rs @@ -100,7 +100,10 @@ fn downloaded(files: &ScriptedFiles) -> Vec { .requests() .into_iter() .filter(|request| request.kind == craft::host::PickKind::Save) - .filter_map(|request| request.file_name.map(std::path::PathBuf::from)) + .filter_map(|request| { + let name = std::path::PathBuf::from(request.file_name?); + Some(request.directory.map_or_else(|| name.clone(), |dir| dir.join(&name))) + }) .filter(|path| files.file(path).is_some()) .collect() }