[vlc-devel] [PATCH 2/2] qml: fix genre page not reponding to grid/list mode changes

Pierre Lamot pierre at videolabs.io
Wed Sep 30 17:52:56 CEST 2020


---
 modules/gui/qt/medialibrary/qml/MusicGenres.qml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/modules/gui/qt/medialibrary/qml/MusicGenres.qml b/modules/gui/qt/medialibrary/qml/MusicGenres.qml
index 6a0ad55dc9..b08c670a64 100644
--- a/modules/gui/qt/medialibrary/qml/MusicGenres.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicGenres.qml
@@ -262,4 +262,15 @@ Widgets.NavigableFocusScope {
         anchors.fill: parent
         focus: genreModel.count !== 0
     }
+
+    Connections {
+        target: mainInterface
+        onGridViewChanged: {
+            if (mainInterface.gridView) {
+                view.replace(gridComponent)
+            } else {
+                view.replace(tableComponent)
+            }
+        }
+    }
 }
-- 
2.25.1



More information about the vlc-devel mailing list