public void SetValueFromInput(double input) { Debug.Assert(GuiHint != GuiHint.GuiTextDisplay || GuiHint != GuiHint.None, Name + " is not an editable value"); SetMin(); SetMax(); if (input < MinValue) { input = MinValue; } else if (input > MaxValue) { input = MaxValue; } Formula.ReplaceExpression(input.ToString()); //prevents it being reset to the default value on Evaluate; Formula.Evaluate(); //force dependants to recalc. ParentComponent.EvalAll(); // this recalcs mass etc. which don't seem to be dependants? TODO: mass, volume etc etc should get the dependant handle if needed. }