cleaning up some commented code

This commit is contained in:
Chris Cochrun 2022-12-04 06:39:36 -06:00
parent aff30cc9e8
commit d02998400a

View file

@ -216,7 +216,6 @@ Item {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton acceptedButtons: Qt.LeftButton | Qt.RightButton
/* preventStealing: true */
/* drag { */ /* drag { */
/* target: visServiceItem */ /* target: visServiceItem */
@ -249,14 +248,10 @@ Item {
else { else {
serviceItemList.currentIndex = index; serviceItemList.currentIndex = index;
serviceItemModel.select(index); serviceItemModel.select(index);
/* currentServiceItem = index; */
/* changeItem(index); */
} }
} }
onDoubleClicked: { onDoubleClicked: {
/* showPassiveNotification("Double Clicked") */
/* serviceItemList.currentIndex = index; */
changeServiceItem(index); changeServiceItem(index);
} }
@ -274,7 +269,9 @@ Item {
width: 20 width: 20
listItem: serviceListItem listItem: serviceListItem
listView: serviceItemList listView: serviceItemList
onMoveRequested: serviceItemModel.moveRows(oldIndex, newIndex, 1) onMoveRequested: serviceItemModel.moveRows(oldIndex,
newIndex,
1)
} }
} }
@ -346,20 +343,20 @@ Item {
active: hovered || pressed active: hovered || pressed
} }
function updateDrag(y) { /* function updateDrag(y) { */
if (moveToIndex === serviceItemList.indexAt(0,y)) /* if (moveToIndex === serviceItemList.indexAt(0,y)) */
return; /* return; */
else /* else */
moveToIndex = serviceItemList.indexAt(0,y); /* moveToIndex = serviceItemList.indexAt(0,y); */
moveRequested(indexDragged, moveToIndex); /* moveRequested(indexDragged, moveToIndex); */
} /* } */
function moveRequested(oldIndex, newIndex) { /* function moveRequested(oldIndex, newIndex) { */
print("moveRequested: ", oldIndex, newIndex); /* print("moveRequested: ", oldIndex, newIndex); */
serviceItemModel.moveRows(oldIndex, newIndex, 1); /* serviceItemModel.moveRows(oldIndex, newIndex, 1); */
indexDragged = newIndex; /* indexDragged = newIndex; */
serviceItemList.currentIndex = newIndex; /* serviceItemList.currentIndex = newIndex; */
} /* } */
} }
@ -374,7 +371,6 @@ Item {
} }
} }
Canvas { Canvas {
/* asynchronous: true; */
x: dropHighlightLine.width - 8 x: dropHighlightLine.width - 8
y: dropHighlightLine.y - 17 y: dropHighlightLine.y - 17
z: 1 z: 1
@ -440,9 +436,10 @@ Item {
id: serviceToolBar id: serviceToolBar
Layout.fillWidth: true Layout.fillWidth: true
opacity: 1.0 opacity: 1.0
display: Button.IconOnly
actions: [ actions: [
Kirigami.Action { Kirigami.Action {
/* text: "Up" */ text: "Up"
icon.name: "arrow-up" icon.name: "arrow-up"
onTriggered: { onTriggered: {
const oldid = serviceItemList.currentIndex; const oldid = serviceItemList.currentIndex;
@ -466,7 +463,7 @@ Item {
} }
}, },
Kirigami.Action { Kirigami.Action {
/* text: "Down" */ text: "Down"
icon.name: "arrow-down" icon.name: "arrow-down"
onTriggered: { onTriggered: {
const id = serviceItemList.currentIndex; const id = serviceItemList.currentIndex;
@ -489,7 +486,7 @@ Item {
} }
}, },
Kirigami.Action { Kirigami.Action {
/* text: "Remove" */ text: "Remove"
icon.name: "delete" icon.name: "delete"
onTriggered: { onTriggered: {
showPassiveNotification("remove"); showPassiveNotification("remove");