[vlc-commits] qml: fix banner source not ignoring unlisted entries properly

Pierre Lamot git at videolan.org
Thu Oct 15 10:33:13 CEST 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Oct  8 16:06:47 2020 +0200| [8aa7bb035f5096e11e5cfdf8489a88f2ddf8eb4a] | committer: Pierre Lamot

qml: fix banner source not ignoring unlisted entries properly

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

 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 5d733eb85b..152965cb0d 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)



More information about the vlc-commits mailing list