From dbcd460c53f70b8d2baebf40599e7fa76af0ed8e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 07:56:01 -0800 Subject: [PATCH] Tests: let the Move dialog close before the units test opens Rectangle dialog_lengths_show_in_the_general_unit confirmed the Move dialog and opened the Rectangle dialog in the same frame. Move holds its OK, so it stays on the stack until the next frame, and Rectangle is laid out once over it and once more, unseen, after Move leaves. The test drew two frames and passed only because the frame after the selection change ran a second pass for the Properties panel. With that panel drawn in one pass, the second frame showed nothing and the assertion failed. The test now draws a frame after OK, so Move has closed before the selection change and the Rectangle dialog. Its assertions are unchanged. --- crates/ui-egui/src/panels/tests_units.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/ui-egui/src/panels/tests_units.rs b/crates/ui-egui/src/panels/tests_units.rs index ecac244136..d5837ffed5 100644 --- a/crates/ui-egui/src/panels/tests_units.rs +++ b/crates/ui-egui/src/panels/tests_units.rs @@ -101,6 +101,8 @@ fn dialog_lengths_show_in_the_general_unit() { window.type_text("10 mm"); window.key(egui::Key::Tab, egui::Modifiers::NONE); confirm_dialog(&mut window.app()); + // The Move dialog holds its OK, so it leaves the stack in the next frame. + window.frame(); let square = { let app = window.app(); let st = app.session.active().unwrap();