Set initial radio button state

This commit is contained in:
Lars Brubaker 2018-02-13 14:13:56 -08:00
parent b658dc5902
commit 11b24dd654
2 changed files with 7 additions and 1 deletions

View file

@ -39,7 +39,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
{
using Aabb = AxisAlignedBoundingBox;
public class ArrangeObject3D : Object3D, IRebuildable
public class ArrangeObject3D : Object3D, IRebuildable, IPropertyGridModifier
{
// We need to serialize this so we can remove the arrange and get back to the objects before arranging
public List<Aabb> ChildrenBounds = new List<Aabb>();

View file

@ -437,6 +437,12 @@ namespace MatterHackers.MatterControl.DesignTools
var localIndex = index;
var iconImage = AggContext.StaticData.LoadIcon(iconsAttribute.IconPaths[localIndex], 16, 16);
var radioButton = new RadioButton(new ImageWidget(iconImage));
// set it if checked
if(enumItem.Value == value.ToString())
{
radioButton.Checked = true;
}
rowContainer.AddChild(radioButton);
var localItem = enumItem;