bevy/crates
Jan Hohenheim e7333510c3
Fix push_children inserting a Children component even when no children are supplied (#14109)
# Objective

The Bevy API around manipulating hierarchies removes `Children` if the
operation results in an entity having no children. This means that
`Children` is guaranteed to hold actual children. However, the following
code unexpectedly inserts empty `Children`:

```rust
commands.entity(entity).with_children(|_| {});
```

This was discovered by @Jondolf:
https://discord.com/channels/691052431525675048/1124043933886976171/1257660865625325800

## Solution

- `with_children` is now a noop when no children were passed

## Testing

- Added a regression test
2024-07-02 22:10:00 +02:00
..
bevy_a11y Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_animation Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_app Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_asset Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_audio Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_color Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_core Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_core_pipeline Fix compile failure in WASM without wgpu backend (#14081) 2024-07-02 07:18:20 +02:00
bevy_derive Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_dev_tools Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_diagnostic Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_dylib Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_dynamic_plugin Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_ecs Backport #14083 (deregister events) to 0.14 branch (#14114) 2024-07-02 16:01:57 -04:00
bevy_encase_derive Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_gilrs Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_gizmos Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_gltf Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_hierarchy Fix push_children inserting a Children component even when no children are supplied (#14109) 2024-07-02 22:10:00 +02:00
bevy_input Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_internal Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_log Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_macro_utils Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_math Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_mikktspace Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_pbr don't put previous skin/morph in the morphed_skinned_mesh_layout (#14065) 2024-06-29 03:29:45 +02:00
bevy_ptr Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_reflect Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_render Clarify the difference between default render layers and none render layers (#14075) 2024-07-02 07:18:21 +02:00
bevy_scene Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_sprite Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_state Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_tasks Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_text Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_time Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_transform Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_ui Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_utils Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_window Release Candidate 0.14.0-rc.4 2024-06-27 23:29:08 +02:00
bevy_winit only run one update per frame drawn (#14023) 2024-06-30 10:01:10 +02:00