clearing some cruft to prepare to overhaul drag and drop

This commit is contained in:
Chris Cochrun 2022-10-18 14:16:52 -05:00
parent 60a64e14aa
commit 3d231f6830

View file

@ -218,8 +218,8 @@ Item {
PropertyChanges { PropertyChanges {
target: visServiceItem target: visServiceItem
backgroundColor: Kirigami.Theme.backgroundColor /* backgroundColor: Kirigami.Theme.backgroundColor */
textColor: Kirigami.Theme.textColor /* textColor: Kirigami.Theme.textColor */
anchors.verticalCenter: undefined anchors.verticalCenter: undefined
anchors.horizontalCenter: undefined anchors.horizontalCenter: undefined
} }
@ -268,7 +268,7 @@ Item {
if (mouse.button === Qt.RightButton) if (mouse.button === Qt.RightButton)
rightClickMenu.popup(); rightClickMenu.popup();
else { else {
/* serviceItemList.currentIndex = index; */ serviceItemList.currentIndex = index;
serviceItemModel.select(index); serviceItemModel.select(index);
/* currentServiceItem = index; */ /* currentServiceItem = index; */
/* changeItem(index); */ /* changeItem(index); */
@ -321,12 +321,6 @@ Item {
} }
function moveRequested(oldIndex, newIndex) { function moveRequested(oldIndex, newIndex) {
if (newIndex === oldIndex)
return;
if (newIndex === -1)
newIndex = 0;
if (newIndex >= serviceItemList.count)
newIndex = serviceItemList.count;
print("moveRequested: ", oldIndex, newIndex); print("moveRequested: ", oldIndex, newIndex);
serviceItemModel.move(oldIndex, newIndex); serviceItemModel.move(oldIndex, newIndex);
indexDragged = newIndex; indexDragged = newIndex;