Default the update button to be hiden
This commit is contained in:
parent
2acc789508
commit
34b5d070cb
20 changed files with 8 additions and 20 deletions
|
|
@ -32,9 +32,9 @@ using System;
|
|||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class HideUpdateButtonAttribute : Attribute
|
||||
public class ShowUpdateButtonAttribute : Attribute
|
||||
{
|
||||
public HideUpdateButtonAttribute()
|
||||
public ShowUpdateButtonAttribute()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -177,7 +177,6 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
}
|
||||
}
|
||||
|
||||
[HideUpdateButtonAttribute]
|
||||
public class Align3D : Object3D, IPublicPropertyObject, IPropertyGridModifier
|
||||
{
|
||||
// We need to serialize this so we can remove the arrange and get back to the objects before arranging
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
|
||||
public enum MaintainRatio { None, X_Y, X_Y_Z }
|
||||
|
||||
[HideUpdateButtonAttribute]
|
||||
public class FitToBounds3D : Object3D, IPublicPropertyObject, IEditorDraw, IPropertyGridModifier
|
||||
{
|
||||
[Description("Set the shape the part will be fit into.")]
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class ConeObject3D : Object3D, IPublicPropertyObject
|
||||
{
|
||||
public ConeObject3D()
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ using MatterHackers.PolygonMesh;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class CubeObject3D : Object3D, IPublicPropertyObject
|
||||
{
|
||||
public CubeObject3D()
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class CylinderObject3D : Object3D, IPublicPropertyObject, IPropertyGridModifier
|
||||
{
|
||||
public CylinderObject3D()
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class HalfCylinderObject3D : Object3D, IPublicPropertyObject
|
||||
{
|
||||
public HalfCylinderObject3D()
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class HalfSphereObject3D : Object3D, IPublicPropertyObject
|
||||
{
|
||||
public HalfSphereObject3D()
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class HalfWedgeObject3D : Object3D, IPublicPropertyObject
|
||||
{
|
||||
public HalfWedgeObject3D()
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class PyramidObject3D : Object3D, IPublicPropertyObject
|
||||
{
|
||||
public PyramidObject3D()
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class RingObject3D : Object3D, IPublicPropertyObject, IPropertyGridModifier
|
||||
{
|
||||
public RingObject3D()
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class SphereObject3D : Object3D, IPublicPropertyObject, IPropertyGridModifier
|
||||
{
|
||||
public SphereObject3D()
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class TorusObject3D : Object3D, IPublicPropertyObject, IPropertyGridModifier
|
||||
{
|
||||
public TorusObject3D()
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class WedgeObject3D : Object3D, IPublicPropertyObject
|
||||
{
|
||||
public WedgeObject3D()
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
}
|
||||
|
||||
// add in an Update button if applicable
|
||||
var hideUpdate = context.item.GetType().GetCustomAttributes(typeof(HideUpdateButtonAttribute), true).FirstOrDefault() as HideUpdateButtonAttribute;
|
||||
if (hideUpdate == null)
|
||||
var showUpdate = context.item.GetType().GetCustomAttributes(typeof(ShowUpdateButtonAttribute), true).FirstOrDefault() as ShowUpdateButtonAttribute;
|
||||
if (showUpdate != null)
|
||||
{
|
||||
var updateButton = theme.ButtonFactory.Generate("Update".Localize());
|
||||
updateButton.Margin = new BorderDouble(5);
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@
|
|||
<Compile Include="CustomWidgets\TreeView\TreeNode.cs" />
|
||||
<Compile Include="CustomWidgets\TreeView\TreeView.cs" />
|
||||
<Compile Include="DesignTools\Attributes\ShowSearchFieldAttribute.cs" />
|
||||
<Compile Include="DesignTools\Attributes\ShowUpdateButtonAttribute.cs" />
|
||||
<Compile Include="DesignTools\Interfaces\IPublicPropertyObject.cs" />
|
||||
<Compile Include="DesignTools\EditableTypes\DirectionAxis.cs" />
|
||||
<Compile Include="DesignTools\EditableTypes\DirectionVector.cs" />
|
||||
|
|
@ -141,7 +142,6 @@
|
|||
<Compile Include="ApplicationView\OemProfileDictionary.cs" />
|
||||
<Compile Include="ApplicationView\WindowsPlatformsFeatures.cs" />
|
||||
<Compile Include="DataStorage\ApplicationDataStorage.cs" />
|
||||
<Compile Include="DesignTools\Attributes\HideUpdateButtonAttribute.cs" />
|
||||
<Compile Include="DesignTools\Attributes\IconsAttribute.cs" />
|
||||
<Compile Include="DesignTools\Attributes\WebPageLinkAttribute.cs" />
|
||||
<Compile Include="DesignTools\Interfaces\IEditorDraw.cs" />
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||
{
|
||||
[HideUpdateButtonAttribute]
|
||||
public class SelectedObjectPanel : FlowLayoutWidget, IContentStore
|
||||
{
|
||||
private IObject3D item = new Object3D();
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ using MatterHackers.PolygonMesh;
|
|||
|
||||
namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
||||
{
|
||||
[ShowUpdateButtonAttribute]
|
||||
public class SubtractAndReplaceObject3D : MeshWrapperObject3D, IPublicPropertyObject
|
||||
{
|
||||
public SubtractAndReplaceObject3D()
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
||||
{
|
||||
[ShowUpdateButtonAttribute]
|
||||
public class SubtractObject3D : MeshWrapperObject3D, IPublicPropertyObject
|
||||
{
|
||||
public SubtractObject3D()
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit ff2b0c012a0f2e3cec4c27e8c7a4e1bbe004e36f
|
||||
Subproject commit 4a69f0ae9b14876c8c4226d8d0d94a3d1283edbf
|
||||
Loading…
Add table
Add a link
Reference in a new issue