From 999a54ffc7d63dc6ca390fbc28f653655202aa43 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Tue, 14 Nov 2023 17:37:26 +0100 Subject: [PATCH] Fix id clash in test_viewports app --- examples/test_viewports/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/test_viewports/src/main.rs b/examples/test_viewports/src/main.rs index 0de38c0ce50..e738f853b81 100644 --- a/examples/test_viewports/src/main.rs +++ b/examples/test_viewports/src/main.rs @@ -165,7 +165,7 @@ fn show_as_popup(ctx: &egui::Context, title: &str, id: Id, content: impl FnOnce( if ctx.viewport_id() == ctx.parent_viewport_id() { egui::Window::new(title).id(id).show(ctx, content); } else { - egui::CentralPanel::default().show(ctx, content); + egui::CentralPanel::default().show(ctx, |ui| ui.push_id(id, content)); } }