diff --git a/MatterControlLib/PartPreviewWindow/SelectedObjectPanel.cs b/MatterControlLib/PartPreviewWindow/SelectedObjectPanel.cs index f0643c9c1..ca0025b04 100644 --- a/MatterControlLib/PartPreviewWindow/SelectedObjectPanel.cs +++ b/MatterControlLib/PartPreviewWindow/SelectedObjectPanel.cs @@ -302,7 +302,14 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { if (selectedItem.Color != colorField.Color) { - undoBuffer.AddAndDo(new ChangeColor(selectedItem, colorField.Color)); + if (colorField.Color == Color.Transparent) + { + undoBuffer.AddAndDo(new ChangeColor(selectedItem, colorField.Color, PrintOutputTypes.Default)); + } + else + { + undoBuffer.AddAndDo(new ChangeColor(selectedItem, colorField.Color, PrintOutputTypes.Solid)); + } } }; @@ -384,7 +391,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow var currentOutputType = selectedItem.OutputType; if (currentOutputType != PrintOutputTypes.Solid && currentOutputType != PrintOutputTypes.Default) { - undoBuffer.AddAndDo(new ChangeColor(selectedItem, colorField.Color)); + undoBuffer.AddAndDo(new ChangeColor(selectedItem, colorField.Color, PrintOutputTypes.Solid)); } SetButtonStates(); diff --git a/MatterControlLib/PartPreviewWindow/View3D/UndoCommands/ChangeColor.cs b/MatterControlLib/PartPreviewWindow/View3D/UndoCommands/ChangeColor.cs index 09547b1f2..dac3ca58c 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/UndoCommands/ChangeColor.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/UndoCommands/ChangeColor.cs @@ -41,10 +41,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow private List itemsColor = new List(); private List itemsToChange = new List(); private Color color; + private PrintOutputTypes outputTypeToSet; - public ChangeColor(IObject3D selectedItem, Color color) + public ChangeColor(IObject3D selectedItem, Color color, PrintOutputTypes outputType) { this.color = color; + this.outputTypeToSet = outputType; if (selectedItem is SelectionGroupObject3D) { SetData(selectedItem.Children.ToList()); @@ -69,7 +71,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { foreach(var item in this.itemsToChange) { - item.OutputType = PrintOutputTypes.Solid; + item.OutputType = outputTypeToSet; item.Color = color; } } diff --git a/MatterControlLib/SlicerConfiguration/EngineMappingsMatterSlice.cs b/MatterControlLib/SlicerConfiguration/EngineMappingsMatterSlice.cs index 0e6c10543..599f5835a 100644 --- a/MatterControlLib/SlicerConfiguration/EngineMappingsMatterSlice.cs +++ b/MatterControlLib/SlicerConfiguration/EngineMappingsMatterSlice.cs @@ -324,7 +324,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration if (supportObjects.Any()) { // add a flag to the merge rules to let us know there was support - mergeRules += "S" + AddObjectsForExtruder(supportObjects, holes, outputOptions, ref savedStlCount); + mergeRules += "S" + AddObjectsForExtruder(supportObjects, null, outputOptions, ref savedStlCount); } var wipeTowerObjects = meshItemsOnBuildPlate.Where((item) => item.WorldOutputType() == PrintOutputTypes.WipeTower); @@ -639,7 +639,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration } } - if (holes.Any()) + if (holes?.Any() == true) { bool firstHole = true;