forked from qt-creator/qt-creator
QmlDesigner.PropertyEditor: Crash fix
Fixing infinite loop in java script. Task-number: QTCREATORBUG-16573 Change-Id: I490d8b85635b7209f7923f9c8341bf77962c57b6 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -43,6 +43,8 @@ Controls.ComboBox {
|
|||||||
|
|
||||||
signal valueFromBackendChanged
|
signal valueFromBackendChanged
|
||||||
|
|
||||||
|
property bool block: false
|
||||||
|
|
||||||
ColorLogic {
|
ColorLogic {
|
||||||
id: colorLogic
|
id: colorLogic
|
||||||
backendValue: comboBox.backendValue
|
backendValue: comboBox.backendValue
|
||||||
@@ -52,6 +54,11 @@ Controls.ComboBox {
|
|||||||
|
|
||||||
function invalidate() {
|
function invalidate() {
|
||||||
|
|
||||||
|
if (block)
|
||||||
|
return
|
||||||
|
|
||||||
|
block = true
|
||||||
|
|
||||||
if (manualMapping) {
|
if (manualMapping) {
|
||||||
valueFromBackendChanged();
|
valueFromBackendChanged();
|
||||||
} else if (!comboBox.useInteger) {
|
} else if (!comboBox.useInteger) {
|
||||||
@@ -72,6 +79,8 @@ Controls.ComboBox {
|
|||||||
if (comboBox.currentIndex !== backendValue.value)
|
if (comboBox.currentIndex !== backendValue.value)
|
||||||
comboBox.currentIndex = backendValue.value
|
comboBox.currentIndex = backendValue.value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
block = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user