[vlc-commits] qml: fix SortControl click event not working with array models

Pierre Lamot git at videolan.org
Fri Jan 10 15:06:20 CET 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Wed Dec 11 16:11:23 2019 +0100| [87ef9201b32564a33e407326743be765424d2438] | committer: Jean-Baptiste Kempf

qml: fix SortControl click event not working with array models

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

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

 modules/gui/qt/widgets/qml/SortControl.qml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/gui/qt/widgets/qml/SortControl.qml b/modules/gui/qt/widgets/qml/SortControl.qml
index 15854e5edb..f48ae13d02 100644
--- a/modules/gui/qt/widgets/qml/SortControl.qml
+++ b/modules/gui/qt/widgets/qml/SortControl.qml
@@ -92,7 +92,6 @@ Widgets.NavigableFocusScope {
 
             clip: true
             implicitHeight: contentHeight
-            model: root.model
             spacing: 0
 
             highlight: Rectangle {
@@ -149,7 +148,7 @@ Widgets.NavigableFocusScope {
 
                 onClicked: {
                     root.currentIndex = index
-                    root.sortSelected(model)
+                    root.sortSelected(Array.isArray(root.model) ? modelData : model)
                     popup.close()
                 }
             }



More information about the vlc-commits mailing list