From c59149e63c9fe297b48c0c57d49c1b43b13a7a6b Mon Sep 17 00:00:00 2001 From: ickshonpe Date: Thu, 30 Mar 2023 15:17:54 +0100 Subject: [PATCH 01/20] changes: * Removed function `update_changed` from `flex_node_system` * Added a `Without` query filter so the two changed node queries in `flex_node_system` are mutually exclusive. * Moved the leaf node update loop into the else block of the update-all if statement. --- crates/bevy_ui/src/flex/mod.rs | 44 ++++++++++++++++------------------ 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/crates/bevy_ui/src/flex/mod.rs b/crates/bevy_ui/src/flex/mod.rs index 62ab50196e5ee..5ccd2cd777f03 100644 --- a/crates/bevy_ui/src/flex/mod.rs +++ b/crates/bevy_ui/src/flex/mod.rs @@ -5,7 +5,7 @@ use bevy_ecs::{ change_detection::DetectChanges, entity::Entity, event::EventReader, - query::{Changed, ReadOnlyWorldQuery, With, Without}, + query::{Changed, Or, ReadOnlyWorldQuery, With, Without}, removal_detection::RemovedComponents, system::{Query, Res, ResMut, Resource}, }; @@ -250,11 +250,14 @@ pub fn flex_node_system( mut resize_events: EventReader, mut flex_surface: ResMut, root_node_query: Query, Without)>, - node_query: Query<(Entity, &Style, Option<&CalculatedSize>), (With, Changed