From d23b310fc6bd499a63e8dfaa06edf91503b2a5eb Mon Sep 17 00:00:00 2001 From: LarsBrubaker Date: Thu, 18 Jan 2018 07:33:12 -0800 Subject: [PATCH] Reorganizing the toolbar a bit --- ApplicationView/ApplicationController.cs | 32 +++++++++++++----------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/ApplicationView/ApplicationController.cs b/ApplicationView/ApplicationController.cs index 56f80a1c1..bf4f71a9e 100644 --- a/ApplicationView/ApplicationController.cs +++ b/ApplicationView/ApplicationController.cs @@ -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()