[vlc-commits] [Git][videolan/vlc][master] qml: fix restore index when media is played from play icon
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Sat Jul 16 08:28:00 UTC 2022
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
5d956e61 by Prince Gupta at 2022-07-16T08:03:49+00:00
qml: fix restore index when media is played from play icon
- - - - -
2 changed files:
- modules/gui/qt/widgets/qml/GridItem.qml
- modules/gui/qt/widgets/qml/MediaCover.qml
Changes:
=====================================
modules/gui/qt/widgets/qml/GridItem.qml
=====================================
@@ -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
=====================================
modules/gui/qt/widgets/qml/MediaCover.qml
=====================================
@@ -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
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5d956e61a15ce6ce86b6b2d9424c1aeb766cc41a
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5d956e61a15ce6ce86b6b2d9424c1aeb766cc41a
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list