[vlc-devel] [PATCH 27/29] qml: remove usage of selection model from artistList
Prince Gupta
guptaprince8832 at gmail.com
Tue Aug 4 13:35:00 CEST 2020
we don't need multiple selection in artistlist
Signed-off-by: Prince Gupta <guptaprince8832 at gmail.com>
---
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 {
--
2.25.1
More information about the vlc-devel
mailing list