forked from qt-creator/qt-creator
QmlDesigner.ComboBox: Minor fix
If we cannot read the index we set the index to 0. Change-Id: Id990ca1640f9314931af9249c798c8b51ea5c0bb Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -66,8 +66,11 @@ Controls.ComboBox {
|
||||
|
||||
var index = comboBox.find(enumString)
|
||||
|
||||
if (index < 0)
|
||||
index = 0
|
||||
|
||||
if (index !== comboBox.currentIndex)
|
||||
comboBox.currentIndex = comboBox.find(enumString)
|
||||
comboBox.currentIndex = index
|
||||
|
||||
} else {
|
||||
if (comboBox.currentIndex !== backendValue.value)
|
||||
|
||||
Reference in New Issue
Block a user