[vlc-commits] qml: fix playlist right click drag prevention

Fatih Uzunoglu git at videolan.org
Mon Aug 10 12:09:57 CEST 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Thu Jul 30 00:04:25 2020 +0300| [7bb87429d8597b25648aa8e8eb91392efa02e512] | committer: Pierre Lamot

qml: fix playlist right click drag prevention

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

 modules/gui/qt/playlist/qml/PLItem.qml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/playlist/qml/PLItem.qml b/modules/gui/qt/playlist/qml/PLItem.qml
index d4e4ac0ad2..56974e05be 100644
--- a/modules/gui/qt/playlist/qml/PLItem.qml
+++ b/modules/gui/qt/playlist/qml/PLItem.qml
@@ -84,10 +84,12 @@ Rectangle {
 
         drag.target: dragItem
 
+        property bool __rightButton : false
+
         Connections {
             target: mouse.drag
             onActiveChanged: {
-                if (mouse.button === Qt.RightButton)
+                if (mouse.__rightButton)
                     return
                 if (target.active) {
                     root.dragStarting()
@@ -103,7 +105,13 @@ Rectangle {
 
         onPressed:  {
             if (mouse.button === Qt.RightButton)
+            {
+                __rightButton = true
                 return
+            }
+            else
+                __rightButton = false
+
             var pos = this.mapToGlobal( mouseX, mouseY)
             dragItem.updatePos(pos.x, pos.y)
         }



More information about the vlc-commits mailing list