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:
commit
dbc2d92fa1
1 changed files with 13 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue