From a0c4e28b657b830f364c392a4deb4ea44bbb7238 Mon Sep 17 00:00:00 2001 From: YgorSouza <43298013+YgorSouza@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:19:51 +0200 Subject: [PATCH] Fix `Id` clash in `Frame` styling widget (#4967) As we have two Margin widgets in the same UI and this widget has a Grid with a hardcoded Id, we have to force a different Id to one of them to avoid clashes. * Closes * [x] I have followed the instructions in the PR template --- crates/egui/src/style.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index a610820e99a..37895331503 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -2501,7 +2501,8 @@ impl Widget for &mut crate::Frame { ui.end_row(); ui.label("Outer margin"); - ui.add(outer_margin); + // Push Id to avoid clashes in the Margin widget's Grid + ui.push_id("outer", |ui| ui.add(outer_margin)); ui.end_row(); ui.label("Rounding");