Made do undo work for subtract, support, color, intersect & paint
This commit is contained in:
parent
33e5ff2dce
commit
b665025e17
8 changed files with 259 additions and 100 deletions
|
|
@ -79,9 +79,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
resetButton.Click += (s, e) =>
|
||||
{
|
||||
var item = scene.SelectedItem;
|
||||
item.Color = Color.Transparent;
|
||||
item.OutputType = PrintOutputTypes.Solid;
|
||||
scene.UndoBuffer.AddAndDo(new ChangeColor(scene.SelectedItem, Color.Transparent));
|
||||
};
|
||||
colorRow.AddChild(resetButton);
|
||||
}
|
||||
|
|
@ -111,12 +109,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
button.Click += (s, e) =>
|
||||
{
|
||||
var item = scene.SelectedItem;
|
||||
if (item != null)
|
||||
{
|
||||
item.Color = colorWidget.BackgroundColor;
|
||||
item.OutputType = PrintOutputTypes.Solid;
|
||||
}
|
||||
scene.UndoBuffer.AddAndDo(new ChangeColor(scene.SelectedItem, colorWidget.BackgroundColor));
|
||||
};
|
||||
return button;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue