Fix sliders to show entire range
Fix angle range on start and end angle sliders
This commit is contained in:
parent
b15ce7c5c5
commit
57f7c56685
5 changed files with 12 additions and 15 deletions
|
|
@ -138,11 +138,11 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
public string EasyModeMessage { get; set; } = "You can switch to Advanced mode to get more cylinder options.";
|
||||
|
||||
[MaxDecimalPlaces(2)]
|
||||
[Slider(3, 360, snapDistance: 1)]
|
||||
[Slider(0, 359, snapDistance: 1)]
|
||||
public DoubleOrExpression StartingAngle { get; set; } = 0;
|
||||
|
||||
[MaxDecimalPlaces(2)]
|
||||
[Slider(3, 360, snapDistance: 1)]
|
||||
[Slider(1, 360, snapDistance: 1)]
|
||||
public DoubleOrExpression EndingAngle { get; set; } = 360;
|
||||
|
||||
[MaxDecimalPlaces(2)]
|
||||
|
|
@ -177,11 +177,6 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
var startingAngle = StartingAngle.ClampIfNotCalculated(this, 0, 360 - .01, ref valuesChanged);
|
||||
var endingAngle = EndingAngle.ClampIfNotCalculated(this, StartingAngle.Value(this) + .01, 360, ref valuesChanged);
|
||||
|
||||
if (valuesChanged)
|
||||
{
|
||||
Invalidate(InvalidateType.DisplayValues);
|
||||
}
|
||||
|
||||
using (RebuildLock())
|
||||
{
|
||||
using (new CenterAndHeightMaintainer(this, MaintainFlags.Origin | MaintainFlags.Bottom))
|
||||
|
|
@ -208,6 +203,8 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Invalidate(InvalidateType.DisplayValues);
|
||||
|
||||
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Mesh));
|
||||
return Task.CompletedTask;
|
||||
|
|
|
|||
|
|
@ -98,11 +98,11 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
public string EasyModeMessage { get; set; } = "You can switch to Advanced mode to get more ring options.";
|
||||
|
||||
[MaxDecimalPlaces(2)]
|
||||
[Slider(3, 360, snapDistance: 1)]
|
||||
[Slider(0, 359, snapDistance: 1)]
|
||||
public DoubleOrExpression StartingAngle { get; set; } = 0;
|
||||
|
||||
[MaxDecimalPlaces(2)]
|
||||
[Slider(3, 360, snapDistance: 1)]
|
||||
[Slider(1, 360, snapDistance: 1)]
|
||||
public DoubleOrExpression EndingAngle { get; set; } = 360;
|
||||
|
||||
[EnumDisplay(Mode = EnumDisplayAttribute.PresentationMode.Buttons)]
|
||||
|
|
|
|||
|
|
@ -89,11 +89,11 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
public string EasyModeMessage { get; set; } = "You can switch to Advanced mode to get more sphere options.";
|
||||
|
||||
[MaxDecimalPlaces(2)]
|
||||
[Slider(3, 360, snapDistance: 1)]
|
||||
[Slider(0, 359, snapDistance: 1)]
|
||||
public DoubleOrExpression StartingAngle { get; set; } = 0;
|
||||
|
||||
[MaxDecimalPlaces(2)]
|
||||
[Slider(3, 360, snapDistance: 1)]
|
||||
[Slider(1, 360, snapDistance: 1)]
|
||||
public DoubleOrExpression EndingAngle { get; set; } = 360;
|
||||
|
||||
[Slider(3, 180, Easing.EaseType.Quadratic, snapDistance: 1)]
|
||||
|
|
|
|||
|
|
@ -76,11 +76,11 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
public string EasyModeMessage { get; set; } = "You can switch to Advanced mode to get more torus options.";
|
||||
|
||||
[MaxDecimalPlaces(2)]
|
||||
[Slider(3, 360, snapDistance: 1)]
|
||||
[Slider(0, 359, snapDistance: 1)]
|
||||
public DoubleOrExpression StartingAngle { get; set; } = 0;
|
||||
|
||||
[MaxDecimalPlaces(2)]
|
||||
[Slider(3, 360, snapDistance: 1)]
|
||||
[Slider(1, 360, snapDistance: 1)]
|
||||
public DoubleOrExpression EndingAngle { get; set; } = 360;
|
||||
|
||||
[Slider(3, 260, Easing.EaseType.Quadratic, snapDistance: 1)]
|
||||
|
|
|
|||
|
|
@ -846,7 +846,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
if (e.InvalidateType.HasFlag(InvalidateType.DisplayValues))
|
||||
{
|
||||
var newValue = (DoubleOrExpression)property.Value;
|
||||
if (newValue.Expression != field.Value)
|
||||
// if (newValue.Expression != field.Value)
|
||||
{
|
||||
// we should never be in the situation where there is an '=' as the in scene controls should be disabled
|
||||
if (newValue.Expression.StartsWith("="))
|
||||
|
|
@ -921,7 +921,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
if (e.InvalidateType.HasFlag(InvalidateType.DisplayValues))
|
||||
{
|
||||
var newValue = (IntOrExpression)property.Value;
|
||||
if (newValue.Expression != field.Value)
|
||||
// if (newValue.Expression != field.Value)
|
||||
{
|
||||
// we should never be in the situation where there is an '=' as the in scene controls should be disabled
|
||||
if (newValue.Expression.StartsWith("="))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue