From 6896b5ae73eb5b87f7014c647a5e90b75219cde4 Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Tue, 21 Feb 2023 21:05:30 +0000 Subject: [PATCH] Fix not initialising ComputedOutlineDepth when first Added. --- src/computed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/computed.rs b/src/computed.rs index 40477f2..56da20c 100644 --- a/src/computed.rs +++ b/src/computed.rs @@ -37,7 +37,7 @@ pub(crate) fn compute_outline_depth( child_query: Query<(&Children, Changed)>, ) { for (mut computed, transform, changed_transform, set_depth, children) in root_query.iter_mut() { - let mut changed = changed_transform || set_depth.filter(|(_, c)| *c).is_some(); + let mut changed = computed.is_added() || changed_transform || set_depth.filter(|(_, c)| *c).is_some(); if changed { let (origin, flat) = if let Some((sd, _)) = set_depth { match sd {