Seek to event on double click instead of highlight

This commit is contained in:
Timotej Lazar 2021-09-15 21:53:42 +02:00
parent bb5b0b4b3f
commit 0bced7522b
No known key found for this signature in database
GPG key ID: B6F38793D143456F
2 changed files with 6 additions and 3 deletions

View file

@ -12,6 +12,8 @@ ListView {
required property var tags // tag definitions required property var tags // tag definitions
property bool editing: false property bool editing: false
signal selected(var event)
clip: true clip: true
focus: true focus: true
highlightMoveDuration: 0 highlightMoveDuration: 0
@ -100,6 +102,7 @@ ListView {
control.currentIndex = index control.currentIndex = index
control.forceActiveFocus() control.forceActiveFocus()
} }
onDoubleClicked: control.selected(event)
contentItem: ColumnLayout { contentItem: ColumnLayout {
anchors { left: parent.left; right: parent.right; margins: 5 } anchors { left: parent.left; right: parent.right; margins: 5 }

View file

@ -147,9 +147,9 @@ Page {
tags: eventList.tags tags: eventList.tags
onEditingChanged: video.pause(editing) onEditingChanged: video.pause(editing)
onCurrentItemChanged: { onSelected: {
if (currentItem) video.pause(true)
video.seek(currentItem.time) video.seek(event.time)
} }
Keys.forwardTo: control Keys.forwardTo: control