[vlc-devel] [PATCH 07/11] qml: fix banner source not ignoring unlisted entries properly
    Pierre Lamot 
    pierre at videolabs.io
       
    Fri Oct  9 12:07:37 CEST 2020
    
    
  
---
 modules/gui/qt/medialibrary/qml/MainDisplay.qml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/medialibrary/qml/MainDisplay.qml b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
index 06a6cffabe..32c6ee7fea 100644
--- a/modules/gui/qt/medialibrary/qml/MainDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MainDisplay.qml
@@ -60,7 +60,9 @@ Widgets.NavigableFocusScope {
         sourcesBanner.contentModel = stackView.currentItem.contentModel
         sourcesBanner.extraLocalActions = stackView.currentItem.extraLocalActions
         // Restore sourcesBanner state
-        sourcesBanner.selectedIndex = pageModel.findIndex(function (e) {
+        sourcesBanner.selectedIndex = pageModel.filter(function (e) {
+            return e.listed;
+        }).findIndex(function (e) {
             return e.name === root.view
         })
         if (stackView.currentItem.pageModel !== undefined)
-- 
2.25.1
    
    
More information about the vlc-devel
mailing list