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