Validate Vector2Field changes via ConvertValue
This commit is contained in:
parent
efc05d544e
commit
9df7cd414e
1 changed files with 6 additions and 0 deletions
|
|
@ -98,6 +98,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
this.Content = container;
|
||||
}
|
||||
|
||||
protected override string ConvertValue(string newValue)
|
||||
{
|
||||
// Ensure we have a two value CSV or force to '0,0'
|
||||
return (newValue?.Split(',').Length == 2) ? newValue.Trim() : "0,0";
|
||||
}
|
||||
|
||||
protected override void OnValueChanged(FieldChangedEventArgs fieldChangedEventArgs)
|
||||
{
|
||||
string[] xyValueStrings2 = this.Value.Split(',');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue