Fix DependentOn

This commit is contained in:
Anton Thomasson 2021-07-11 12:11:56 +02:00
parent c4b8fd0b74
commit 1b87e7a29f

View file

@ -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]
}