diff --git a/qml/components/DependentOn.qml b/qml/components/DependentOn.qml index 528b09f..1615538 100644 --- a/qml/components/DependentOn.qml +++ b/qml/components/DependentOn.qml @@ -14,7 +14,7 @@ Item { overlap.push(values[i]) } } - parent.valid = parent.valid && overlap != [] + parent.valid = parent.valid && overlap.length != 0 } Connections { @@ -31,7 +31,7 @@ Item { target: parent onChoiceChanged: { - if(parent.choice != undefined) + if(parent.choice != undefined && overlap.indexOf(targetConnection.target.choice) == -1) { targetConnection.target.choice = overlap[0] }