Fix initializing event descriptor params in rules wizard
This commit is contained in:
parent
e8f9e83abd
commit
78871eaa68
@ -153,7 +153,6 @@ ItemDelegate {
|
|||||||
Loader {
|
Loader {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
sourceComponent: {
|
sourceComponent: {
|
||||||
print("***********+ loading", root.type)
|
|
||||||
switch (root.type) {
|
switch (root.type) {
|
||||||
case "uint":
|
case "uint":
|
||||||
case "int":
|
case "int":
|
||||||
@ -189,6 +188,11 @@ ItemDelegate {
|
|||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
root.value = text;
|
root.value = text;
|
||||||
}
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (root.value == null || root.v^alue == undefined) {
|
||||||
|
root.value = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,6 +216,12 @@ ItemDelegate {
|
|||||||
onMoved: {
|
onMoved: {
|
||||||
root.value = value;
|
root.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (root.value == null || root.v^alue == undefined) {
|
||||||
|
root.value = from;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Label { text: Types.toUiValue(root.maxValue, root.unit) }
|
Label { text: Types.toUiValue(root.maxValue, root.unit) }
|
||||||
}
|
}
|
||||||
@ -226,6 +236,11 @@ ItemDelegate {
|
|||||||
value: root.value != undefined ? root.value : 0
|
value: root.value != undefined ? root.value : 0
|
||||||
onValueModified: root.value = value
|
onValueModified: root.value = value
|
||||||
floatingPoint: root.type === "double"
|
floatingPoint: root.type === "double"
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (root.value == null || root.v^alue == undefined) {
|
||||||
|
root.value = from
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,6 +254,11 @@ ItemDelegate {
|
|||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
root.value = model.get(currentIndex).value
|
root.value = model.get(currentIndex).value
|
||||||
}
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (root.value == null || root.v^alue == undefined) {
|
||||||
|
root.value = model.get(currentIndex).value
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,6 +268,12 @@ ItemDelegate {
|
|||||||
model: root.allowedValues
|
model: root.allowedValues
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
root.value = root.allowedValues[currentIndex]
|
root.value = root.allowedValues[currentIndex]
|
||||||
|
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (root.value == null || root.v^alue == undefined) {
|
||||||
|
root.value = root.allowedValues[currentIndex]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user