Put in the ability for double edit fields to respond to value changes

In the curve tool we change the diameter of the curve and the editor was
not updating to show the new value. Now it is.
This commit is contained in:
LarsBrubaker 2018-06-21 07:44:11 -07:00
parent 5bde6edbf0
commit 4b9a427d45
4 changed files with 38 additions and 15 deletions

View file

@ -64,6 +64,7 @@ namespace MatterHackers.MatterControl.DesignTools
private void Rebuild(UndoBuffer undoBuffer)
{
this.DebugDepth("Rebuild");
bool updateDiameter = Diameter == double.MinValue;
using (RebuildLock())
{
@ -77,7 +78,7 @@ namespace MatterHackers.MatterControl.DesignTools
var aabb = this.GetAxisAlignedBoundingBox();
if (Diameter == double.MinValue)
if (updateDiameter)
{
// uninitialized set to a reasonable value
Diameter = (int)aabb.XSize;
@ -176,6 +177,10 @@ namespace MatterHackers.MatterControl.DesignTools
}
base.OnInvalidate(new InvalidateArgs(this, InvalidateType.Mesh));
if(updateDiameter)
{
base.OnInvalidate(new InvalidateArgs(this, InvalidateType.Properties));
}
}
public override void OnInvalidate(InvalidateArgs invalidateType)