mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -04:00
Fix: assign a different id to each table cell, avoiding id clashes (#4076)
Each cell in a table now has a `Ui` with a unique `Id` based on the row and column. This avoids Id-clashes, e.g. when putting a `CollapsingHeader` in a table cell.
This commit is contained in:
@@ -194,7 +194,13 @@ impl<'a, 'b> Strip<'a, 'b> {
|
||||
clip: self.clip,
|
||||
..Default::default()
|
||||
};
|
||||
self.layout.add(flags, width, height, add_contents);
|
||||
self.layout.add(
|
||||
flags,
|
||||
width,
|
||||
height,
|
||||
egui::Id::new(self.size_index),
|
||||
add_contents,
|
||||
);
|
||||
}
|
||||
|
||||
/// Add an empty cell.
|
||||
|
||||
Reference in New Issue
Block a user