Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the double leaf node updates in flex_node_system #8264

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Mar 30, 2023

Objective

If a UI node has a changed CalculatedSize component and either the UI does a full update or the node also has a changed Style component, the node's corresponding Taffy node will be updated twice by flex_node_system.

Solution

Add a Without<Calculated> query filter so that the two changed node queries in flex_node_system are mutually exclusive and move the CalculatedSize node updater into the else block of the full-update if conditional.

* Removed function `update_changed` from `flex_node_system`
* Added a `Without<Calculated>` 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.
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets labels Mar 30, 2023
@alice-i-cecile alice-i-cecile added this to the 0.11 milestone Mar 30, 2023
Copy link
Contributor

@Weibye Weibye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Weibye Weibye added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Apr 14, 2023
@alice-i-cecile
Copy link
Member

@ickshonpe once merge conflicts are fixed, ping me and I'll merge this.

@ickshonpe
Copy link
Contributor Author

@alice-i-cecile should be ready

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 21, 2023
Merged via the queue into bevyengine:main with commit 0cf3000 Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants