From c65f2920bb960ff199bb8fedbeca5b36be2e1ba1 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Fri, 18 Oct 2024 16:53:10 -0700 Subject: [PATCH] Fix `animation_masks` example's buttons (#15996) # Objective Fixes #15995 ## Solution Corrects a mistake made during the example migration in #15591. `AnimationControl` was meant to be on the parent, not the child. So the query in `update_ui` was no longer matching. ## Testing `cargo run --example animation_masks` --- examples/animation/animation_masks.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/animation/animation_masks.rs b/examples/animation/animation_masks.rs index 1382a8f031..08e3b365c9 100644 --- a/examples/animation/animation_masks.rs +++ b/examples/animation/animation_masks.rs @@ -316,6 +316,10 @@ fn add_mask_group_control(parent: &mut ChildBuilder, label: &str, width: Val, ma ..default() }, BorderColor(Color::WHITE), + AnimationControl { + group_id: mask_group_id, + label: *label, + }, )) .with_child(( Text(format!("{:?}", label)), @@ -330,10 +334,6 @@ fn add_mask_group_control(parent: &mut ChildBuilder, label: &str, width: Val, ma margin: UiRect::vertical(Val::Px(3.0)), ..default() }, - AnimationControl { - group_id: mask_group_id, - label: *label, - }, )); } });