AdministrationWindow: Fix default value change check

This commit is contained in:
2023-09-01 12:57:09 +02:00
parent effc9f9230
commit 56a0eb794e
3 changed files with 8 additions and 8 deletions

View File

@ -279,9 +279,9 @@ namespace Elwig.Windows {
} else if (input is CheckComboBox ccb) {
return !ccb.SelectedItems.Cast<object>().ToArray().SequenceEqual(((object[]?)DefaultValues[ccb]) ?? Array.Empty<object>());
} else if (input is CheckBox cb) {
return DefaultValues[cb] != (object?)cb.IsChecked;
return (string?)DefaultValues[cb] != (cb.IsChecked != null ? (cb.IsChecked == true ? bool.TrueString : bool.FalseString) : null);
} else if (input is RadioButton rb) {
return DefaultValues[rb] != (object?)rb.IsChecked;
return (string?)DefaultValues[rb] != (rb.IsChecked != null ? (rb.IsChecked == true ? bool.TrueString : bool.FalseString) : null);
} else {
return false;
}