From dcc1b2158ca28f90c000a3edd0526eaacb2a833f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 6 Nov 2026 09:35:43 -0800 Subject: [PATCH] Tests: canvas frame helper reads the selection's marks as shapes A frame that repeats a view now draws the marks as one mesh. frame_output drops the kept marks first, so the tests that read outlines and anchors from the frame's shapes keep working. --- crates/ui-egui/src/canvas/tests.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ui-egui/src/canvas/tests.rs b/crates/ui-egui/src/canvas/tests.rs index ebfe960bb..84788bb70 100644 --- a/crates/ui-egui/src/canvas/tests.rs +++ b/crates/ui-egui/src/canvas/tests.rs @@ -1621,6 +1621,9 @@ fn frame_output(app: &mut VectorcraftApp, ctx: &egui::Context) -> (Vec, e s => out.push(s), } } + // With no kept marks the frame draws the selection's marks as separate shapes, which callers + // read. `selection_marks::tests` compares them with the kept mesh. + app.canvas.selection_marks = Default::default(); let raw = egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(Pos2::ZERO, vec2(800.0, 600.0))), ..Default::default() }; let out = ctx.run_ui(raw, |ui| show(app, ui)); let mut v = vec![];