Skip to content
Snippets Groups Projects
Commit 5d956e61 authored by Prince Gupta's avatar Prince Gupta :speech_balloon: Committed by Rémi Denis-Courmont
Browse files

qml: fix restore index when media is played from play icon

parent b4c14482
No related branches found
No related tags found
1 merge request!2211qml: fix restore index when media is played from play icon
Pipeline #242032 passed with stage
in 17 minutes and 18 seconds
......@@ -232,7 +232,12 @@ T.Control {
Layout.preferredWidth: pictureWidth
Layout.preferredHeight: pictureHeight
onPlayIconClicked: root.playClicked()
onPlayIconClicked: {
// emulate a mouse click before delivering the play signal as to select the item
// this helps in updating the selection and restore of initial index in the parent views
root.itemClicked(picture, mouse.button, mouse.modifiers)
root.playClicked()
}
DoubleShadow {
id: unselectedShadow
......
......@@ -49,7 +49,7 @@ Rectangle {
// Signals
signal playIconClicked
signal playIconClicked(var /* MouseEvent */ mouse)
// Settings
......@@ -86,7 +86,7 @@ Rectangle {
sourceComponent: Widgets.PlayCover {
width: playIconSize
onClicked: playIconClicked()
onClicked: playIconClicked(mouse)
}
asynchronous: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment