1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 14:49:06 -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,
transform: emath::TSTransform,
add_contents: impl FnOnce(&mut Self) -> R,
) -> InnerResponse<R> {
) -> R {
let start_idx = self.ctx().graphics(|gx| {
gx.get(self.layer_id())
.map_or(crate::layers::ShapeIdx(0), |l| l.next_idx())
});
add_contents(self);
let r = add_contents(self);
self.ctx().graphics_mut(|g| {
let list = g.entry(self.layer_id());