mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
Remove the With<Parent>
query filter from bevy_ui::render::extract_uinode_borders
(#9285)
# Objective Remove the `With<Parent>` 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 <mockersf@gmail.com>
This commit is contained in:
parent
fb19b81e40
commit
da59de956f
1 changed files with 2 additions and 2 deletions
|
@ -276,7 +276,7 @@ pub fn extract_uinode_borders(
|
||||||
Without<ContentSize>,
|
Without<ContentSize>,
|
||||||
>,
|
>,
|
||||||
>,
|
>,
|
||||||
parent_node_query: Extract<Query<&Node, With<Parent>>>,
|
node_query: Extract<Query<&Node>>,
|
||||||
) {
|
) {
|
||||||
let image = bevy_render::texture::DEFAULT_IMAGE_HANDLE.typed();
|
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
|
// Both vertical and horizontal percentage border values are calculated based on the width of the parent node
|
||||||
// <https://developer.mozilla.org/en-US/docs/Web/CSS/border-width>
|
// <https://developer.mozilla.org/en-US/docs/Web/CSS/border-width>
|
||||||
let parent_width = parent
|
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)
|
.map(|parent_node| parent_node.size().x)
|
||||||
.unwrap_or(ui_logical_viewport_size.x);
|
.unwrap_or(ui_logical_viewport_size.x);
|
||||||
let left =
|
let left =
|
||||||
|
|
Loading…
Reference in a new issue