[vlc-commits] qml: reset section property on sort criteria changed in VideoListDisplay
    Prince Gupta 
    git at videolan.org
       
    Thu Jan 14 14:42:36 UTC 2021
    
    
  
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Thu Dec 24 20:54:34 2020 +0530| [28965f407dd5e2e788f79170b6076f35b16e5954] | committer: Pierre Lamot
qml: reset section property on sort criteria changed in VideoListDisplay
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=28965f407dd5e2e788f79170b6076f35b16e5954
---
 modules/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 = ""
+            }
+        }
+    }
 }
    
    
More information about the vlc-commits
mailing list