[vlc-commits] qml: move dblClick handler from AudioGridItem to MusicAlbums

Pierre Lamot git at videolan.org
Thu Feb 20 13:56:34 CET 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Jan 30 18:07:11 2020 +0100| [d8cddc0b09de1658672f62d90479aabcd522ec43] | committer: Jean-Baptiste Kempf

qml: move dblClick handler from AudioGridItem to MusicAlbums

  the behavior is not shared amongst the view where it's used
  (different behavior in the Genre view)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d8cddc0b09de1658672f62d90479aabcd522ec43
---

 modules/gui/qt/medialibrary/qml/AudioGridItem.qml | 1 -
 modules/gui/qt/medialibrary/qml/MusicAlbums.qml   | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/medialibrary/qml/AudioGridItem.qml b/modules/gui/qt/medialibrary/qml/AudioGridItem.qml
index ebd0d472b4..84eb37ff19 100644
--- a/modules/gui/qt/medialibrary/qml/AudioGridItem.qml
+++ b/modules/gui/qt/medialibrary/qml/AudioGridItem.qml
@@ -30,5 +30,4 @@ Widgets.GridItem {
     isVideo: false
     pictureWidth: VLCStyle.cover_normal
     pictureHeight: VLCStyle.cover_normal
-    onItemDoubleClicked: if ( model.id !== undefined ) { medialib.addAndPlay( model.id ) }
 }
diff --git a/modules/gui/qt/medialibrary/qml/MusicAlbums.qml b/modules/gui/qt/medialibrary/qml/MusicAlbums.qml
index cee4bdf1fb..3d4e998dd8 100644
--- a/modules/gui/qt/medialibrary/qml/MusicAlbums.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicAlbums.qml
@@ -148,6 +148,10 @@ Widgets.NavigableFocusScope {
                     gridView_id.currentIndex = index
                     gridView_id.forceActiveFocus()
                 }
+
+                onItemDoubleClicked: {
+                    if ( model.id !== undefined ) { medialib.addAndPlay( model.id ) }
+                }
             }
 
             expandDelegate: MusicAlbumsGridExpandDelegate {



More information about the vlc-commits mailing list