[vlc-commits] [Git][videolan/vlc][master] qml: set 0ms removeDisplaced transition in ListViewExt

François Cartegnie (@fcartegnie) gitlab at videolan.org
Mon Sep 28 06:01:43 UTC 2026



François Cartegnie pushed to branch master at VideoLAN / VLC


Commits:
0e1bf4ef by SK Devane at 2026-09-28T07:47:04+02:00
qml: set 0ms removeDisplaced transition in ListViewExt

- - - - -


1 changed file:

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


Changes:

=====================================
modules/gui/qt/widgets/qml/ListViewExt.qml
=====================================
@@ -354,8 +354,8 @@ ListView {
     // WARNING: Add displaced transition is disabled, because it is
     //          often not executed properly, and causes items to have
     //          incorrect positions. It is currently not possible to
-    //          recover from that situation. Fortunately move and
-    //          remove displaced seemingly are not affected from that
+    //          recover from that situation. Fortunately move displaced 
+    //          seemingly is not affected from that
     //          issue. See QTBUG-131106, QTBUG-89158, ...
 
     component DefaultDisplacedTransition : Transition {
@@ -378,8 +378,17 @@ ListView {
         view: root
     }
 
-    removeDisplaced: DefaultDisplacedTransition {
-        view: root
+    // NOTE: removeDisplaced uses a 0ms transition as a workaround for QTBUG-131106.
+    // Disabling the transition (or setting it to null) breaks item recycling (reuseItems: true)
+    // during multi-slice deletions, causing delegate position overlap.
+    // The 0ms transition preserves the Transition lifecycle while avoiding displacement coordinate desync.
+    removeDisplaced: Transition {
+        enabled: !!root.acceptDropFunc
+
+        NumberAnimation {
+            property: (root.orientation === ListView.Vertical) ? "y" : "x"
+            duration: 0
+        }
     }
 
     // Events



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0e1bf4ef52fb0fb7f86c06563c84dd4c17fd8fc1
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list