1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

CentralPanel: base id on the current viewport (#3593)

This means two `CentralPanel`s in different viewports get different ids,
avoiding id clashes
This commit is contained in:
Emil Ernerfeldt
2023-11-20 21:54:32 +01:00
committed by GitHub
parent 44ff29b012
commit 39271c3adf
3 changed files with 3 additions and 5 deletions

View File

@@ -178,7 +178,7 @@ fn show_as_popup(
// Not a real viewport
egui::Window::new(title).id(id).show(ctx, content);
} else {
egui::CentralPanel::default().show(ctx, |ui| ui.push_id(id, content));
egui::CentralPanel::default().show(ctx, content);
}
}