Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If you remove a `ContentSize` component from a Bevy UI entity and then immediately replace it `ui_layout_system` will remove the measure func from the internal Taffy layout tree but no new measure func will be generated to replace it since it's the widget systems that are responsible for creating their respective measure funcs not `ui_layout_system`. The widget systems only perform updates on changes to their content, and don't check `ContentSize` for changes. This means that until the content is changed in some way, no content will be displayed by the node. This commit fixes this by performing `ui_layout_system`'s `ContentSize` removal detection and resolution first, before measure func updates and in the widget systems generating a new `Measure` when a `ContentSize` component is added to a widget entity.
- Loading branch information