Fix not initialising ComputedOutlineDepth when first Added.
This commit is contained in:
parent
3f2deedb93
commit
6896b5ae73
@ -37,7 +37,7 @@ pub(crate) fn compute_outline_depth(
|
|||||||
child_query: Query<(&Children, Changed<Children>)>,
|
child_query: Query<(&Children, Changed<Children>)>,
|
||||||
) {
|
) {
|
||||||
for (mut computed, transform, changed_transform, set_depth, children) in root_query.iter_mut() {
|
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 {
|
if changed {
|
||||||
let (origin, flat) = if let Some((sd, _)) = set_depth {
|
let (origin, flat) = if let Some((sd, _)) = set_depth {
|
||||||
match sd {
|
match sd {
|
||||||
|
Loading…
Reference in New Issue
Block a user