From 2a4184ab328a6ff0165d1fa696d00cb0204fe157 Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Thu, 16 Mar 2023 01:27:06 +0000 Subject: [PATCH] Fix outline depth being propagated onto children without InheritOutlineDepth. --- src/computed.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/computed.rs b/src/computed.rs index 40df231..69b6dfe 100644 --- a/src/computed.rs +++ b/src/computed.rs @@ -35,7 +35,10 @@ pub(crate) fn compute_outline_depth( ), Without, >, - mut computed_query: Query<(&mut ComputedOutlineDepth, Changed)>, + mut computed_query: Query< + (&mut ComputedOutlineDepth, Changed), + With, + >, child_query: Query<(&Children, Changed)>, ) { for (mut computed, transform, changed_transform, set_depth, children) in root_query.iter_mut() { @@ -75,7 +78,10 @@ fn propagate_outline_depth( root_computed: &ComputedOutlineDepth, mut changed: bool, entity: Entity, - computed_query: &mut Query<(&mut ComputedOutlineDepth, Changed)>, + computed_query: &mut Query< + (&mut ComputedOutlineDepth, Changed), + With, + >, child_query: &Query<(&Children, Changed)>, ) { if let Ok((mut computed, changed_inherit)) = computed_query.get_mut(entity) {