Skip to content

Commit 27aceb3

Browse files
Just-Kielcbentejac
authored andcommitted
[ui] fix : invalide value when reopening AttributeEditor
1 parent 3f3f2e6 commit 27aceb3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,14 @@ RowLayout {
348348
inputModel: attribute.values
349349

350350
Component.onCompleted: {
351-
currentIndex = find(attribute.value)
351+
// if value not in list, override the text and precise it is not valid
352+
var idx = find(attribute.value)
353+
if (idx === -1) {
354+
displayText = attribute.value
355+
validValue = false
356+
} else {
357+
currentIndex = idx
358+
}
352359
}
353360

354361
onEditingFinished: function(value) {

0 commit comments

Comments
 (0)