a lot of tweaks to make changing slides work

This commit is contained in:
Chris Cochrun 2023-01-20 13:38:40 -06:00
parent a024a0b27d
commit f535bc1500
5 changed files with 75 additions and 52 deletions

View file

@ -7,8 +7,6 @@ import org.presenter 1.0
Item {
id: root
// Lets set the outerModelData so we can access that data here.
implicitHeight: Kirigami.Units.gridUnit * 6.5
implicitWidth: Kirigami.Units.gridUnit * 10
Rectangle {
@ -59,7 +57,7 @@ Item {
id: previewerMouse
anchors.fill: parent
hoverEnabled: true
/* onClicked: changeServiceItem(index) */
onClicked: changeServiceItem(index)
cursorShape: Qt.PointingHandCursor
propagateComposedEvents: true
}
@ -67,8 +65,10 @@ Item {
Connections {
target: SlideModel
onDataChanged: if (active)
previewSlidesList.positionViewAtIndex(index, ListView.Contain)
onDataChanged: {
if (active)
previewSlidesList.positionViewAtIndex(index, ListView.Contain);
}
}
function changeSlideAndIndex(serviceItem, index) {