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 <https://github.com/emilk/egui/issues/4965>
* [x] I have followed the instructions in the PR template
This commit is contained in:
YgorSouza 2024-08-26 11:19:51 +02:00 committed by GitHub
parent cc3a09187d
commit a0c4e28b65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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");