[vlc-commits] qml: remove usage of selection model from artistList

Prince Gupta git at videolan.org
Mon Aug 10 12:09:53 CEST 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Jul 24 19:00:40 2020 +0530| [d24fe23fa59c1ee43c5ae9dacdf93c10f57de5c7] | committer: Pierre Lamot

qml: remove usage of selection model from artistList

we don't need multiple selection in artistlist

Signed-off-by: Prince Gupta <guptaprince8832 at gmail.com>

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

 modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
index 7424ca2f2f..ca385f3e87 100644
--- a/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicArtistsDisplay.qml
@@ -103,8 +103,6 @@ Widgets.NavigableFocusScope {
 
             focus: true
 
-            onSelectAll: selectionModel.selectAll()
-            onSelectionUpdated: selectionModel.updateSelection( keyModifiers, oldIndex, newIndex )
             onCurrentIndexChanged: {
                 if (artistList.currentIndex < artistModel.count) {
                     root.artistId =  artistModel.getIdForIndex(artistList.currentIndex)
@@ -133,14 +131,9 @@ Widgets.NavigableFocusScope {
                 height: VLCStyle.play_cover_small + (VLCStyle.margin_xsmall * 2)
                 width: artistList.width
 
-                property bool selected: selectionModel.isSelected(artistModel.index(index, 0))
+                property bool selected: artistList.currentIndex === index
                 property bool _highlighted: selected || this.hovered || this.activeFocus
 
-                Connections {
-                   target: selectionModel
-                   onSelectionChanged: selected = selectionModel.isSelected(artistModel.index(index, 0))
-                }
-
                 color: VLCStyle.colors.getBgColor(selected, this.hovered, this.activeFocus)
 
                 cover: Item {



More information about the vlc-commits mailing list