[vlc-devel] [PATCH 01/15] qml: fix expand delegate not showing up for video grid view

Prince Gupta guptaprince8832 at gmail.com
Tue Jul 21 14:17:59 CEST 2020


---
 modules/gui/qt/medialibrary/qml/VideoDisplay.qml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/medialibrary/qml/VideoDisplay.qml b/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
index 856bfb370c..104abb31ff 100644
--- a/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/VideoDisplay.qml
@@ -69,6 +69,7 @@ Widgets.NavigableFocusScope {
     Widgets.MenuExt {
         id: contextMenu
         property var model: ({})
+        property int itemIndex: -1
         closePolicy: Popup.CloseOnReleaseOutside | Popup.CloseOnEscape
 
         Widgets.MenuItemExt {
@@ -95,7 +96,7 @@ Widgets.NavigableFocusScope {
             enabled: medialib.gridView
             text: "Information"
             onTriggered: {
-                view.currentItem.switchExpandItem(contextMenu.model.index)
+                view.currentItem.switchExpandItem(contextMenu.itemIndex)
             }
         }
         Widgets.MenuItemExt {
@@ -155,6 +156,7 @@ Widgets.NavigableFocusScope {
 
                 onContextMenuButtonClicked: {
                     contextMenu.model = videoGridItem.model
+                    contextMenu.itemIndex = index
                     contextMenu.popup()
                 }
 
-- 
2.25.1



More information about the vlc-devel mailing list