better working changing slides and serviceItems

This commit is contained in:
Chris Cochrun 2023-01-20 15:38:11 -06:00
parent e30ee1a53e
commit 1ed76ff3e3
3 changed files with 23 additions and 62 deletions

View file

@ -44,7 +44,7 @@ Item {
Controls.Label {
id: slidesTitle
width: parent.width * 7
width: previewHighlight.width
anchors.top: previewHighlight.bottom
/* anchors.leftMargin: Kirigami.Units.smallSpacing * 8 */
anchors.topMargin: Kirigami.Units.smallSpacing * 3
@ -57,7 +57,7 @@ Item {
id: previewerMouse
anchors.fill: parent
hoverEnabled: true
onClicked: SlideObject.changeSlide(SlideModel.getItem(index))
onClicked: changeSlide(index)
cursorShape: Qt.PointingHandCursor
propagateComposedEvents: true
}
@ -70,18 +70,4 @@ Item {
previewSlidesList.positionViewAtIndex(index, ListView.Contain);
}
}
function changeSlideAndIndex(serviceItem, index) {
// TODO
console.log("Item: " + serviceItem.index + " is " + serviceItem.active);
if (!serviceItem.active) {
changeServiceItem(serviceItem.index)
previewSlidesList.currentIndex = serviceItem.index;
}
console.log("Slide Index is: " + index);
if (outerModelData.slideNumber === 0)
return;
SlideObject.changeSlideIndex(index);
console.log("New slide index is: " + SlideObject.slideIndex);
}
}