[vlc-commits] qml: fix external drag&drop duplicate insertion

Fatih Uzunoglu git at videolan.org
Thu Oct 15 10:32:42 CEST 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Oct  9 19:56:32 2020 +0300| [958ea28ff0c0f527d69488c4d1497db75798fad1] | committer: Pierre Lamot

qml: fix external drag&drop duplicate insertion

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

 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)
                             }



More information about the vlc-commits mailing list