making highlight follow changeslide

This commit is contained in:
Chris Cochrun 2023-01-22 14:36:21 -06:00
parent 8fad5cadb4
commit 31db6ab1ef

View file

@ -57,7 +57,9 @@ Item {
id: previewerMouse
anchors.fill: parent
hoverEnabled: true
onClicked: changeSlide(index)
onClicked: {
changeSlide(index);
}
cursorShape: Qt.PointingHandCursor
propagateComposedEvents: true
}
@ -66,8 +68,10 @@ Item {
Connections {
target: SlideModel
onDataChanged: {
if (active)
if (active) {
previewSlidesList.currentIndex = index;
previewSlidesList.positionViewAtIndex(index, ListView.Contain);
}
}
}
}