adding changeSlideAndIndex and enabling that on previewSlidesList

This commit is contained in:
Chris Cochrun 2023-01-17 06:25:09 -06:00
parent 187481295f
commit 84f89fb201
3 changed files with 44 additions and 1 deletions

View file

@ -69,7 +69,7 @@ Item {
id: innerMouse
anchors.fill: parent
hoverEnabled: true
onClicked: changeServiceItem(outerModelData.index)
onClicked: changeSlideAndIndex(outerModelData, index)
cursorShape: Qt.PointingHandCursor
}
}
@ -103,4 +103,15 @@ Item {
previewSlidesList.positionViewAtIndex(index, ListView.Center)
}
}
function changeSlideAndIndex(serviceItem, index) {
// TODO
console.log("Item: " + serviceItem.index + " is " + serviceItem.active);
if (!serviceItem.active)
changeServiceItem(serviceItem.index)
console.log("Slide Index is: " + index);
if (index === 0)
return;
SlideObject.changeSlideIndex(index);
}
}