Skip to content

Commit

Permalink
Fix id clash in test_viewports app
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Nov 14, 2023
1 parent d6c1505 commit 999a54f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/test_viewports/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 999a54f

Please sign in to comment.