updating old leftdock
This commit is contained in:
parent
23b7210169
commit
c10e42cc2c
1 changed files with 19 additions and 3 deletions
|
@ -287,6 +287,7 @@ ColumnLayout {
|
||||||
print("moveRequested: ", oldIndex, newIndex);
|
print("moveRequested: ", oldIndex, newIndex);
|
||||||
visualModel.items.move(oldIndex, newIndex);
|
visualModel.items.move(oldIndex, newIndex);
|
||||||
indexDragged = newIndex;
|
indexDragged = newIndex;
|
||||||
|
serviceItemList.currentIndex = indexDragged;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -337,17 +338,32 @@ ColumnLayout {
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
/* text: "Up" */
|
/* text: "Up" */
|
||||||
icon.name: "arrow-up"
|
icon.name: "arrow-up"
|
||||||
onTriggered: showPassiveNotification("Up")
|
onTriggered: {
|
||||||
|
const oldid = serviceItemList.currentIndex;
|
||||||
|
const newid = serviceItemList.currentIndex - 1;
|
||||||
|
showPassiveNotification("Up");
|
||||||
|
serviceItemList.moveRequested(oldid, newid);
|
||||||
|
serviceItemList.currentIndex = newid;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
/* text: "Down" */
|
/* text: "Down" */
|
||||||
icon.name: "arrow-down"
|
icon.name: "arrow-down"
|
||||||
onTriggered: showPassiveNotification("down")
|
onTriggered: {
|
||||||
|
const oldid = serviceItemList.currentIndex;
|
||||||
|
const newid = serviceItemList.currentIndex + 1;
|
||||||
|
showPassiveNotification("Down");
|
||||||
|
serviceItemList.moveRequested(oldid, newid);
|
||||||
|
serviceItemList.currentIndex = newid;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
/* text: "Remove" */
|
/* text: "Remove" */
|
||||||
icon.name: "delete"
|
icon.name: "delete"
|
||||||
onTriggered: showPassiveNotification("remove")
|
onTriggered: {
|
||||||
|
showPassiveNotification("remove");
|
||||||
|
removeItem(serviceItemList.currentIndex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue