Seek to event on double click instead of highlight
This commit is contained in:
parent
bb5b0b4b3f
commit
0bced7522b
2 changed files with 6 additions and 3 deletions
|
@ -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 }
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue