Fix List widget not updating children because iterator not consumed
This commit is contained in:
parent
c3c8fcf52c
commit
62b90179a2
1 changed files with 17 additions and 16 deletions
|
|
@ -363,10 +363,11 @@ where
|
||||||
let state = tree.state.downcast_mut::<State>();
|
let state = tree.state.downcast_mut::<State>();
|
||||||
let offset = layout.position() - Point::ORIGIN;
|
let offset = layout.position() - Point::ORIGIN;
|
||||||
|
|
||||||
self.visible_elements
|
for (element, (index, layout, tree)) in self
|
||||||
|
.visible_elements
|
||||||
.iter_mut()
|
.iter_mut()
|
||||||
.zip(&mut state.visible_layouts)
|
.zip(&mut state.visible_layouts)
|
||||||
.map(|(element, (index, layout, tree))| {
|
{
|
||||||
element.as_widget_mut().update(
|
element.as_widget_mut().update(
|
||||||
tree,
|
tree,
|
||||||
event,
|
event,
|
||||||
|
|
@ -379,8 +380,8 @@ where
|
||||||
clipboard,
|
clipboard,
|
||||||
shell,
|
shell,
|
||||||
viewport,
|
viewport,
|
||||||
)
|
);
|
||||||
});
|
}
|
||||||
|
|
||||||
if let Event::Window(window::Event::RedrawRequested(_)) = event {
|
if let Event::Window(window::Event::RedrawRequested(_)) = event {
|
||||||
match &mut state.task {
|
match &mut state.task {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue