Merge pull request #3406 from larsbrubaker/design_tools

Make Operation Source apply create a group if more than 1 item
This commit is contained in:
johnlewin 2018-06-11 16:56:26 -07:00 committed by GitHub
commit dbc2d92fa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,19 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
{
list.Remove(sourceItem);
}
if (list.Count > 1)
{
// wrap the children in an object so they remain a group
var group = new Object3D();
group.Children.Modify((groupList) =>
{
groupList.AddRange(list);
});
list.Clear();
list.Add(group);
}
});
parent.ResumeRebuild();