Making Bake and Remove work for array

This commit is contained in:
LarsBrubaker 2018-02-17 08:57:56 -08:00
parent 247bf009f7
commit 4e126ef3a6
3 changed files with 59 additions and 8 deletions

View file

@ -42,6 +42,8 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
}
public override string ActiveEditor => "PublicPropertyEditor";
public override bool CanBake => true;
public override bool CanRemove => true;
public int Count { get; set; } = 3;
public DirectionVector Direction { get; set; } = new DirectionVector { Normal = new Vector3(1, 0, 0) };
public double Distance { get; set; } = 30;
@ -63,5 +65,17 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
}
});
}
public override void Remove()
{
this.Children.Modify(list =>
{
IObject3D firstChild = list.First();
list.Clear();
list.Add(firstChild);
});
base.Remove();
}
}
}