[vlc-commits] qml: don't expand the item in ExpandGridView when the grid is empty

Pierre Lamot git at videolan.org
Tue Nov 19 16:50:18 CET 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Nov 18 13:02:40 2019 +0100| [7e66188d6f51debc0ad50ea3966e205c60e06600] | committer: Jean-Baptiste Kempf

qml: don't expand the item in ExpandGridView when the grid is empty

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt/qml/utils/ExpandGridView.qml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/gui/qt/qml/utils/ExpandGridView.qml b/modules/gui/qt/qml/utils/ExpandGridView.qml
index 2bfa6c91db..6e2242bc48 100644
--- a/modules/gui/qt/qml/utils/ExpandGridView.qml
+++ b/modules/gui/qt/qml/utils/ExpandGridView.qml
@@ -66,6 +66,9 @@ NavigableFocusScope {
     }
 
     function switchExpandItem(index) {
+        if (modelCount === 0)
+            return
+
         if (index === _expandIndex)
             _newExpandIndex = -1
         else



More information about the vlc-commits mailing list