[vlc-devel] [PATCH 33/39] qml: reset section property on sort criteria changed in VideoListDisplay
    Prince Gupta 
    guptaprince8832 at gmail.com
       
    Thu Jan  7 11:50:29 UTC 2021
    
    
  
---
 .../gui/qt/medialibrary/qml/VideoListDisplay.qml    | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml b/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
index a382045439..8df4327dbe 100644
--- a/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
@@ -59,4 +59,17 @@ MainInterface.MainTableView {
                     ].filter(function(a) { return a !== "" })
         }
     }
+
+    Connections {
+        target: model
+        onSortCriteriaChanged: {
+            switch (model.sortCriteria) {
+            case "title":
+                listView_id.section.property = "title_first_symbol"
+                break;
+            default:
+                listView_id.section.property = ""
+            }
+        }
+    }
 }
-- 
2.25.1
    
    
More information about the vlc-devel
mailing list