bevy/crates/bevy_ui/src
Gabriel Bourgeois 6b75589e2c Fix inconsistent children removal behavior (#6017)
# Objective

Fixes #6010

## Solution

As discussed in #6010, this makes it so the `Children` component is removed from the entity whenever all of its children are removed. The behavior is now consistent between all of the commands that may remove children from a parent, and this is tested via two new test functions (one for world functions and one for commands).

Documentation was also added to `insert_children`, `push_children`, `add_child` and `remove_children` commands to make this behavior clearer for users.

## Changelog

- Fixed `Children` component not getting removed from entity when all its children are moved to a new parent.

## Migration Guide

- Queries with `Changed<Children>` will no longer match entities that had all of their children removed using `remove_children`.
- `RemovedComponents<Children>` will now contain entities that had all of their children remove using `remove_children`.
2022-10-06 21:39:34 +00:00
..
flex Fix inconsistent children removal behavior (#6017) 2022-10-06 21:39:34 +00:00
render Rename UiColor to BackgroundColor (#6087) 2022-09-25 00:39:17 +00:00
widget Limit FontAtlasSets (#5708) 2022-09-19 16:12:12 +00:00
entity.rs Don't use the UIBundle's Transform Fields (#6095) 2022-09-26 01:31:22 +00:00
focus.rs bevy_reflect: Update enum derives (#5473) 2022-08-02 22:40:29 +00:00
geometry.rs Add additional constructors for UiRect to specify values for specific fields (#5988) 2022-09-27 18:11:39 +00:00
lib.rs Exclusive Systems Now Implement System. Flexible Exclusive System Params (#6083) 2022-09-26 23:57:07 +00:00
ui_node.rs Rename UiColor to BackgroundColor (#6087) 2022-09-25 00:39:17 +00:00
update.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00