Reorganizing the toolbar a bit

This commit is contained in:
LarsBrubaker 2018-01-18 07:33:12 -08:00 committed by Lars Brubaker
parent ed27695dbb
commit d23b310fc6

View file

@ -316,6 +316,7 @@ namespace MatterHackers.MatterControl
IsEnabled = (scene) => scene.HasSelection,
Icon = AggContext.StaticData.LoadIcon("ungroup.png").SetPreMultiply(),
},
new SceneSelectionSeparator(),
new SceneSelectionOperation()
{
TitleResolver = () => "Duplicate".Localize(),
@ -330,6 +331,7 @@ namespace MatterHackers.MatterControl
IsEnabled = (scene) => scene.HasSelection,
Icon = AggContext.StaticData.LoadIcon("remove.png").SetPreMultiply(),
},
new SceneSelectionSeparator(),
new SceneSelectionOperation()
{
TitleResolver = () => "Lay Flat".Localize(),
@ -343,7 +345,21 @@ namespace MatterHackers.MatterControl
IsEnabled = (scene) => scene.HasSelection,
Icon = AggContext.StaticData.LoadIcon("lay_flat.png").SetPreMultiply(),
},
new SceneSelectionOperation()
{
TitleResolver = () => "Make Support".Localize(),
Action = (scene) =>
{
if (scene.SelectedItem != null
&& !scene.SelectedItem.VisibleMeshes().All(i => i.OutputType == PrintOutputTypes.Support))
{
scene.UndoBuffer.AddAndDo(new MakeSupport(scene.SelectedItem));
}
},
Icon = AggContext.StaticData.LoadIcon("support.png").SetPreMultiply(),
IsEnabled = (scene) => scene.HasSelection,
},
new SceneSelectionSeparator(),
new SceneSelectionOperation()
{
TitleResolver = () => "Subtract".Localize(),
@ -365,20 +381,6 @@ namespace MatterHackers.MatterControl
Icon = AggContext.StaticData.LoadIcon("paint.png").SetPreMultiply(),
IsEnabled = (scene) => scene.SelectedItem is SelectionGroup,
},
new SceneSelectionOperation()
{
TitleResolver = () => "Make Support".Localize(),
Action = (scene) =>
{
if (scene.SelectedItem != null
&& scene.SelectedItem.OutputType != PrintOutputTypes.Support)
{
scene.UndoBuffer.AddAndDo(new MakeSupport(scene.SelectedItem));
}
},
Icon = AggContext.StaticData.LoadIcon("support.png").SetPreMultiply(),
IsEnabled = (scene) => scene.HasSelection,
},
#if DEBUG // keep this work in progress to the editor for now
new SceneSelectionSeparator(),
new SceneSelectionOperation()