From 12e3f1bcb87d112bcf5aa63dd894981daa5e060e Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sat, 20 Jan 2024 10:03:36 +0700 Subject: [PATCH] Fix custom checked/unchecked state values matching for checkbox editor widget --- src/qml/editorwidgets/CheckBox.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qml/editorwidgets/CheckBox.qml b/src/qml/editorwidgets/CheckBox.qml index c4952d50cd..40266c94e0 100644 --- a/src/qml/editorwidgets/CheckBox.qml +++ b/src/qml/editorwidgets/CheckBox.qml @@ -85,7 +85,8 @@ EditorWidgetBase { editedValue = !isNull ? !actualValue : true } else { if (!isNull) { - editedValue = value === config['CheckedState'] ? config['UncheckedState'] : config['CheckedState'] + // Type coercion is desired here as custom unchecked/checked states are stored as strings yet value could be integers + editedValue = value == config['CheckedState'] ? config['UncheckedState'] : config['CheckedState'] } else { editedValue = config['CheckedState'] }