Fix Mutation::ReplacePlaceholder
This commit is contained in:
parent
11669f597b
commit
cb4407766d
|
@ -1,7 +1,7 @@
|
||||||
use crate::events::is_supported_event;
|
use crate::events::is_supported_event;
|
||||||
use bevy::{
|
use bevy::{
|
||||||
ecs::{entity::Entity, world::World},
|
ecs::{entity::Entity, system::Command, world::World},
|
||||||
hierarchy::{BuildWorldChildren, Children, Parent},
|
hierarchy::{BuildWorldChildren, Children, DespawnRecursive, Parent},
|
||||||
prelude::default,
|
prelude::default,
|
||||||
render::color::Color,
|
render::color::Color,
|
||||||
text::{Text, TextStyle},
|
text::{Text, TextStyle},
|
||||||
|
@ -90,7 +90,7 @@ pub fn apply_mutations(
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let new = stack.drain((stack.len() - m)..).collect::<Vec<Entity>>();
|
let new = stack.drain((stack.len() - m)..).collect::<Vec<Entity>>();
|
||||||
existing_parent.insert_children(existing_index, &new);
|
existing_parent.insert_children(existing_index, &new);
|
||||||
world.despawn(existing);
|
DespawnRecursive { entity: existing }.apply(world);
|
||||||
}
|
}
|
||||||
Mutation::InsertAfter { id, m } => todo!(),
|
Mutation::InsertAfter { id, m } => todo!(),
|
||||||
Mutation::InsertBefore { id, m } => todo!(),
|
Mutation::InsertBefore { id, m } => todo!(),
|
||||||
|
|
Loading…
Reference in a new issue