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:
Thomas Hartmann
2014-08-07 15:46:10 +02:00
parent 7d5d5fa311
commit f112076227

View File

@@ -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)