From dc288839935f9390e855b6f3fc6146070faf38a4 Mon Sep 17 00:00:00 2001 From: Bar Borer Date: Tue, 3 Nov 2026 05:35:02 +0200 Subject: [PATCH] Tests: build the viewer tests' EvalCtx from the session's active comp Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/panels/viewer/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui-egui/src/panels/viewer/tests.rs b/crates/ui-egui/src/panels/viewer/tests.rs index 9cc8afc4c..066df8c3f 100644 --- a/crates/ui-egui/src/panels/viewer/tests.rs +++ b/crates/ui-egui/src/panels/viewer/tests.rs @@ -157,7 +157,7 @@ fn parented_session(parent: serde_json::Value) -> (effectcraft_engine::Session, fn with_ctx(s: &effectcraft_engine::Session, f: impl FnOnce(&EvalCtx) -> T) -> T { let comp = s.active_comp().unwrap(); - f(&EvalCtx::new(&s.project, comp.id, comp, Tick::ZERO)) + f(&EvalCtx::new(&s.project, s.active_comp_id().unwrap(), comp, Tick::ZERO)) } /// #2870: the pivot of a child follows its parent, through the camera for a 3D layer