From da59de956f023fd5c2f934ce4427ba655e297a37 Mon Sep 17 00:00:00 2001 From: ickshonpe Date: Mon, 31 Jul 2023 21:33:17 +0100 Subject: [PATCH] Remove the `With` query filter from `bevy_ui::render::extract_uinode_borders` (#9285) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Objective Remove the `With` query filter from the `parent_node_query` parameter of the `bevy_ui::render::extract_uinode_borders` function. This is a bug, the query is only used to retrieve the size of the current node's parent. We don't care if that parent node has a `Parent` or not. --------- Co-authored-by: François --- crates/bevy_ui/src/render/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_ui/src/render/mod.rs b/crates/bevy_ui/src/render/mod.rs index 707dbbf656..43753866dd 100644 --- a/crates/bevy_ui/src/render/mod.rs +++ b/crates/bevy_ui/src/render/mod.rs @@ -276,7 +276,7 @@ pub fn extract_uinode_borders( Without, >, >, - parent_node_query: Extract>>, + node_query: Extract>, ) { let image = bevy_render::texture::DEFAULT_IMAGE_HANDLE.typed(); @@ -304,7 +304,7 @@ pub fn extract_uinode_borders( // Both vertical and horizontal percentage border values are calculated based on the width of the parent node // let parent_width = parent - .and_then(|parent| parent_node_query.get(parent.get()).ok()) + .and_then(|parent| node_query.get(parent.get()).ok()) .map(|parent_node| parent_node.size().x) .unwrap_or(ui_logical_viewport_size.x); let left =