forked from qt-creator/qt-creator
QmlDesigner: Fix HelperWidgets ComboBox
Task-number: QDS-926 Change-Id: I77eafbf8c66b8a384dc8786726c74c89acad58ad Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
79576601db
commit
8f9fa82880
@@ -62,9 +62,7 @@ StudioControls.ComboBox {
|
||||
ColorLogic {
|
||||
id: colorLogic
|
||||
backendValue: comboBox.backendValue
|
||||
onValueFromBackendChanged: {
|
||||
invalidate();
|
||||
}
|
||||
onValueFromBackendChanged: invalidate()
|
||||
|
||||
function invalidate() {
|
||||
|
||||
@@ -74,9 +72,9 @@ StudioControls.ComboBox {
|
||||
block = true
|
||||
|
||||
if (manualMapping) {
|
||||
valueFromBackendChanged();
|
||||
comboBox.valueFromBackendChanged()
|
||||
} else if (!comboBox.useInteger) {
|
||||
var enumString = comboBox.backendValue.enumeration;
|
||||
var enumString = comboBox.backendValue.enumeration
|
||||
|
||||
if (enumString === "")
|
||||
enumString = comboBox.backendValue.value
|
||||
@@ -100,24 +98,23 @@ StudioControls.ComboBox {
|
||||
|
||||
onActivated: {
|
||||
if (!__isCompleted)
|
||||
return;
|
||||
return
|
||||
|
||||
if (backendValue === undefined)
|
||||
return;
|
||||
return
|
||||
|
||||
if (manualMapping)
|
||||
return;
|
||||
return
|
||||
|
||||
if (!comboBox.useInteger) {
|
||||
backendValue.setEnumeration(comboBox.scope, comboBox.currentText);
|
||||
backendValue.setEnumeration(comboBox.scope, comboBox.currentText)
|
||||
} else {
|
||||
backendValue.value = comboBox.currentIndex;
|
||||
backendValue.value = comboBox.currentIndex
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
colorLogic.invalidate()
|
||||
__isCompleted = true;
|
||||
__isCompleted = true
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user