[ui] fix : invalide value when reopening AttributeEditor

This commit is contained in:
Aurore LAFAURIE 2024-04-08 18:30:53 +02:00 committed by Candice Bentéjac
parent 3f3f2e647d
commit 27aceb33e1

View file

@ -348,7 +348,14 @@ RowLayout {
inputModel: attribute.values
Component.onCompleted: {
currentIndex = find(attribute.value)
// if value not in list, override the text and precise it is not valid
var idx = find(attribute.value)
if (idx === -1) {
displayText = attribute.value
validValue = false
} else {
currentIndex = idx
}
}
onEditingFinished: function(value) {