Merge pull request #4224 from larsbrubaker/2.19.2

Fix combine position
This commit is contained in:
Lars Brubaker 2019-01-26 11:51:58 -08:00 committed by GitHub
commit 2be61bdb3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -100,10 +100,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
if (newChildren.Count > 1) if (newChildren.Count > 1)
{ {
// wrap the children in an object so they remain a group // wrap the children in an object so they remain a group
var group = new Object3D() var group = new Object3D();
{
Name = this.Name + " - " + "Flattened".Localize()
};
group.Children.Modify((groupList) => group.Children.Modify((groupList) =>
{ {
groupList.AddRange(newChildren); groupList.AddRange(newChildren);
@ -113,6 +110,9 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
newChildren.Add(group); newChildren.Add(group);
} }
// add flatten to the name to show what happened
newChildren[0].Name = this.Name + " - " + "Flattened".Localize();
// and replace us with the children // and replace us with the children
var replaceCommand = new ReplaceCommand(new[] { this }, newChildren); var replaceCommand = new ReplaceCommand(new[] { this }, newChildren);
if (undoBuffer != null) if (undoBuffer != null)

View file

@ -247,7 +247,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
{ {
Mesh = resultMesh Mesh = resultMesh
}; };
resultsItem.CopyProperties(first, Object3DPropertyFlags.All); resultsItem.CopyProperties(first, Object3DPropertyFlags.All & (~Object3DPropertyFlags.Matrix));
this.Children.Add(resultsItem); this.Children.Add(resultsItem);
SourceContainer.Visible = false; SourceContainer.Visible = false;