fix(ui): stop NumericUpDown from writing null into non-nullable settings
Clearing the text box to type a new value sets Value to null, which the TwoWay binding then wrote into an int/decimal target -- InvalidCastException on the normal way of editing eight settings fields. KeepLastNumberConverter maps that null to BindingOperations.DoNothing so the source keeps its last value.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
<converters:BoolToItalicConverter x:Key="BoolToItalic"/>
|
||||
<converters:BoolToDraftOpacityConverter x:Key="BoolToDraftOpacity"/>
|
||||
<converters:LogKindForegroundConverter x:Key="LogKindForeground"/>
|
||||
<converters:KeepLastNumberConverter x:Key="KeepLastNumber"/>
|
||||
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
||||
Reference in New Issue
Block a user