Fix state selection in rule page

This commit is contained in:
Michael Zanetti 2021-03-16 22:03:05 +01:00
parent b4bdcf635b
commit 195f3f88f2

View File

@ -93,7 +93,7 @@ Page {
}
} else {
if (root.thing) {
listView.model = thingClass.stateTypes;
listView.model = root.thing.thingClass.stateTypes;
}
}
}
@ -130,7 +130,7 @@ Page {
}
} else {
if (root.thing) {
var stateType = root.thingClass.stateTypes.getStateType(model.id);
var stateType = root.thing.thingClass.stateTypes.getStateType(model.id);
root.stateDescriptor.stateTypeId = model.id;
var paramsPage = pageStack.push(Qt.resolvedUrl("SelectStateDescriptorParamsPage.qml"), {stateDescriptor: root.stateDescriptor})
paramsPage.onBackPressed.connect(function() {pageStack.pop()});