Actually pass down the new env in EnvScope::lifecycle.
@@ -69,7 +69,7 @@ impl<T: Data, W: Widget<T>> Widget<T> for EnvScope<T, W> {
fn lifecycle(&mut self, ctx: &mut LifeCycleCtx, event: &LifeCycle, data: &T, env: &Env) {
let mut new_env = env.clone();
(self.f)(&mut new_env, &data);
- self.child.lifecycle(ctx, event, data, env)
+ self.child.lifecycle(ctx, event, data, &new_env)
}
fn update(&mut self, ctx: &mut UpdateCtx, old_data: &T, data: &T, env: &Env) {
