From b5bc480daa19343f462edc8169e36646248b119b Mon Sep 17 00:00:00 2001 From: LarsBrubaker Date: Sat, 26 Jan 2019 11:43:59 -0800 Subject: [PATCH] Fix combine position Make flatten name consistent --- .../DesignTools/Operations/OperationSourceObject3D.cs | 8 ++++---- .../PartPreviewWindow/View3D/Actions/CombineObject3D.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MatterControlLib/DesignTools/Operations/OperationSourceObject3D.cs b/MatterControlLib/DesignTools/Operations/OperationSourceObject3D.cs index f2375e9a4..e2b2d5ed4 100644 --- a/MatterControlLib/DesignTools/Operations/OperationSourceObject3D.cs +++ b/MatterControlLib/DesignTools/Operations/OperationSourceObject3D.cs @@ -100,10 +100,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations if (newChildren.Count > 1) { // wrap the children in an object so they remain a group - var group = new Object3D() - { - Name = this.Name + " - " + "Flattened".Localize() - }; + var group = new Object3D(); group.Children.Modify((groupList) => { groupList.AddRange(newChildren); @@ -113,6 +110,9 @@ namespace MatterHackers.MatterControl.DesignTools.Operations 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 var replaceCommand = new ReplaceCommand(new[] { this }, newChildren); if (undoBuffer != null) diff --git a/MatterControlLib/PartPreviewWindow/View3D/Actions/CombineObject3D.cs b/MatterControlLib/PartPreviewWindow/View3D/Actions/CombineObject3D.cs index fa85bd4c1..b361b6501 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/Actions/CombineObject3D.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/Actions/CombineObject3D.cs @@ -247,7 +247,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D { Mesh = resultMesh }; - resultsItem.CopyProperties(first, Object3DPropertyFlags.All); + resultsItem.CopyProperties(first, Object3DPropertyFlags.All & (~Object3DPropertyFlags.Matrix)); this.Children.Add(resultsItem); SourceContainer.Visible = false;