Merge PR #225: Fix item selection for rules in nested browser subpages
This commit is contained in:
commit
9b6eac3175
@ -10,7 +10,7 @@ Page {
|
|||||||
property Device device: null
|
property Device device: null
|
||||||
property string itemId: ""
|
property string itemId: ""
|
||||||
|
|
||||||
signal selected(string itemId)
|
signal selected(string selectedItemId)
|
||||||
|
|
||||||
header: NymeaHeader {
|
header: NymeaHeader {
|
||||||
onBackPressed: pageStack.pop()
|
onBackPressed: pageStack.pop()
|
||||||
@ -34,12 +34,13 @@ Page {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
if (model.browsable) {
|
if (model.browsable) {
|
||||||
var page = pageStack.push(Qt.resolvedUrl("SelectBrowserItemActionPage.qml"), {device: root.device, itemId: model.id});
|
var page = pageStack.push(Qt.resolvedUrl("SelectBrowserItemActionPage.qml"), {device: root.device, itemId: model.id});
|
||||||
page.selected.connect(function() {
|
page.selected.connect(function(selectedItemId) {
|
||||||
pageStack.pop();
|
pageStack.pop();
|
||||||
root.selected(model.id);
|
root.selected(selectedItemId);
|
||||||
})
|
})
|
||||||
} else if (model.executable) {
|
} else if (model.executable) {
|
||||||
pageStack.pop();
|
pageStack.pop();
|
||||||
|
print("selected:", model.id)
|
||||||
root.selected(model.id);
|
root.selected(model.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,8 +134,9 @@ Page {
|
|||||||
if (root.device) {
|
if (root.device) {
|
||||||
if (model.actionTypeId === "browse") {
|
if (model.actionTypeId === "browse") {
|
||||||
var page = pageStack.push(Qt.resolvedUrl("SelectBrowserItemActionPage.qml"), {device: root.device});
|
var page = pageStack.push(Qt.resolvedUrl("SelectBrowserItemActionPage.qml"), {device: root.device});
|
||||||
page.selected.connect(function(itemId) {
|
page.selected.connect(function(selectedItemId) {
|
||||||
root.ruleAction.browserItemId = itemId;
|
print("selected is", selectedItemId)
|
||||||
|
root.ruleAction.browserItemId = selectedItemId;
|
||||||
root.ruleAction.actionTypeId = "";
|
root.ruleAction.actionTypeId = "";
|
||||||
root.ruleAction.interfaceAction = "";
|
root.ruleAction.interfaceAction = "";
|
||||||
pageStack.pop();
|
pageStack.pop();
|
||||||
|
|||||||
Reference in New Issue
Block a user