[vlc-devel] [PATCH 11/16] qml: fix selection not updating when artist is changed in MusicArtist

Prince Gupta guptaprince8832 at gmail.com
Fri Dec 4 12:19:08 CET 2020


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

diff --git a/modules/gui/qt/medialibrary/qml/MusicArtist.qml b/modules/gui/qt/medialibrary/qml/MusicArtist.qml
index 4573b9bc96..db3b79c431 100644
--- a/modules/gui/qt/medialibrary/qml/MusicArtist.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicArtist.qml
@@ -249,6 +249,12 @@ Widgets.NavigableFocusScope {
             delegateModel: albumSelectionModel
             model: albumModel
 
+            Connections {
+                target: root
+                // selectionModel updates but doesn't trigger any signal, this forces selection update in view
+                onParentIdChanged: currentIndex = -1
+            }
+
             delegate: AudioGridItem {
                 id: audioGridItem
 
-- 
2.25.1



More information about the vlc-devel mailing list