[vlc-commits] [Git][videolan/vlc][master] qml: fix going out of bounds in `ExpandGridView`

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Jun 17 11:50:49 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
cbe5d587 by Fatih Uzunoglu at 2025-06-17T11:32:57+00:00
qml: fix going out of bounds in `ExpandGridView`

It appears that d4c114ea revealed this bug in `ExpandGridView`.
I have not observed this before, because it was still dormant in
the home page without b1f3e4ef, which was added in the last minute.
Nevertheless, this should have been observable in the browse
page, but for some reason I have not observed it there either.

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/ExpandGridView.qml


Changes:

=====================================
modules/gui/qt/widgets/qml/ExpandGridView.qml
=====================================
@@ -509,6 +509,12 @@ FocusScope {
     //use the same signature as Gridview.positionViewAtIndex(index, PositionMode mode)
     //mode is ignored at the moment
     function positionViewAtIndex(index, mode) {
+        // FIXME: Ideally this check should not be necessary, but without it the view
+        //        goes out of bounds. If the content height is smaller than the view-
+        //        port, then positioning is meaningless.
+        if (flickable.contentHeight <= flickable.height)
+            return
+
         if (flickable.width === 0 || flickable.height === 0
             ||
             index < 0 || index >= _count)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cbe5d587bc28e9892245e7c3b9a0a6a6406c2717

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cbe5d587bc28e9892245e7c3b9a0a6a6406c2717
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list