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:
mika kuns
2026-08-06 10:20:53 +02:00
parent 091aca521f
commit 56f7d64f07
3 changed files with 33 additions and 8 deletions
+1
View File
@@ -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>