[vlc-devel] [PATCH 11/27] qml: fix external drag&drop duplicate insertion

Fatih Uzunoglu fuzun54 at outlook.com
Fri Oct 9 18:56:32 CEST 2020


---
 modules/gui/qt/playlist/qml/PLItem.qml           | 2 +-
 modules/gui/qt/playlist/qml/PlaylistListView.qml | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/playlist/qml/PLItem.qml b/modules/gui/qt/playlist/qml/PLItem.qml
index 48cdca3e75..4283670b42 100644
--- a/modules/gui/qt/playlist/qml/PLItem.qml
+++ b/modules/gui/qt/playlist/qml/PLItem.qml
@@ -393,7 +393,7 @@ Rectangle {
                             root.plmodel.moveItemsPost(root.plmodel.getSelection(), root.plmodel.count - 1)
                         }
                         root.setItemDropIndicatorVisible(model.index, false, false);
-                        drop.accept()
+                        drop.accept(Qt.IgnoreAction)
                     }
                     else
                     {
diff --git a/modules/gui/qt/playlist/qml/PlaylistListView.qml b/modules/gui/qt/playlist/qml/PlaylistListView.qml
index 5d9fc8000b..4308374255 100644
--- a/modules/gui/qt/playlist/qml/PlaylistListView.qml
+++ b/modules/gui/qt/playlist/qml/PlaylistListView.qml
@@ -398,6 +398,7 @@ Widgets.NavigableFocusScope {
                                 for ( var url in drop.urls)
                                     urlList.push(drop.urls[url])
                                 mainPlaylistController.insert(target, urlList, false)
+                                drop.accept(Qt.IgnoreAction)
                             } else {
                                 root.plmodel.moveItemsPre(root.plmodel.getSelection(), target)
                             }
-- 
2.25.1



More information about the vlc-devel mailing list