Skip to content

Commit

Permalink
Fix custom checked/unchecked state values matching for checkbox edito…
Browse files Browse the repository at this point in the history
…r widget
  • Loading branch information
nirvn committed Jan 22, 2024
1 parent cdca63b commit 12e3f1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/qml/editorwidgets/CheckBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}
Expand Down

1 comment on commit 12e3f1b

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.