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:
parent
5bde6edbf0
commit
4b9a427d45
4 changed files with 38 additions and 15 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue