Getting remove and bake working for mesh wrapper opperations

This commit is contained in:
LarsBrubaker 2018-02-19 16:20:19 -08:00
parent 1801f7145c
commit 9068502c00
2 changed files with 8 additions and 1 deletions

View file

@ -46,6 +46,13 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
public override void Remove()
{
// remove all the mesh wrappers that we own
var meshWrappers = this.Descendants().Where(o => o.OwnerID == this.ID).ToList();
foreach(var meshWrapper in meshWrappers)
{
meshWrapper.Remove();
}
// collapes our children into our parent
base.Remove();
}