Commit e518074a authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.PropertyEditor: Allow "manual mapping" in combo box

Sometimes there is no trivial mapping between model and values.

Change-Id: I2617f14828b97ba7352aa3a8f3d2ebb9fd2f3809
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent dac62dad
......@@ -43,6 +43,10 @@ Controls.ComboBox {
property bool __isCompleted: false
property bool manualMapping: false
signal valueFromBackendChanged
ColorLogic {
id: colorLogic
backendValue: comboBox.backendValue
......@@ -51,7 +55,10 @@ Controls.ComboBox {
}
function invalidate() {
if (!comboBox.useInteger) {
if (manualMapping) {
valueFromBackendChanged();
} else if (!comboBox.useInteger) {
var enumString = comboBox.backendValue.enumeration;
if (enumString === "")
......@@ -76,6 +83,9 @@ Controls.ComboBox {
if (backendValue === undefined)
return;
if (manualMapping)
return;
if (!comboBox.useInteger) {
backendValue.setEnumeration(comboBox.scope, comboBox.currentText);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment