1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Fix response

This commit is contained in:
lucasmerlin
2026-01-25 22:13:40 +01:00
parent dea8b59ac0
commit 79d7954055

View File

@@ -2981,13 +2981,13 @@ impl Ui {
&mut self, &mut self,
transform: emath::TSTransform, transform: emath::TSTransform,
add_contents: impl FnOnce(&mut Self) -> R, add_contents: impl FnOnce(&mut Self) -> R,
) -> InnerResponse<R> { ) -> R {
let start_idx = self.ctx().graphics(|gx| { let start_idx = self.ctx().graphics(|gx| {
gx.get(self.layer_id()) gx.get(self.layer_id())
.map_or(crate::layers::ShapeIdx(0), |l| l.next_idx()) .map_or(crate::layers::ShapeIdx(0), |l| l.next_idx())
}); });
add_contents(self); let r = add_contents(self);
self.ctx().graphics_mut(|g| { self.ctx().graphics_mut(|g| {
let list = g.entry(self.layer_id()); let list = g.entry(self.layer_id());