summaryrefslogtreecommitdiffstats
path: root/src/widget/wlibrarysidebar.cpp
diff options
context:
space:
mode:
authorRJ Ryan <rryan@mixxx.org>2014-11-28 12:45:11 -0500
committerRJ Ryan <rryan@mixxx.org>2014-11-28 13:12:28 -0500
commit9b087b081bb5caa5652fe8a7356e171fd17e9e48 (patch)
tree804ad631375524c52e21b8d2027ee01b9fc7bb04 /src/widget/wlibrarysidebar.cpp
parentd2cca543f79c1b07c5cc6ef6af22a6d38821ca73 (diff)
Drag and drop updates.
* Don't allow dragging a track from a deck to itself. Bug #1395431. * Unify DnD logic a bit. * Fix drag-and-drop of playlist files to Library, Crates and AutoDJ in the sidebar.
Diffstat (limited to 'src/widget/wlibrarysidebar.cpp')
-rw-r--r--src/widget/wlibrarysidebar.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widget/wlibrarysidebar.cpp b/src/widget/wlibrarysidebar.cpp
index e839bf97c2..8ba2088b16 100644
--- a/src/widget/wlibrarysidebar.cpp
+++ b/src/widget/wlibrarysidebar.cpp
@@ -44,8 +44,12 @@ void WLibrarySidebar::contextMenuEvent(QContextMenuEvent *event) {
void WLibrarySidebar::dragEnterEvent(QDragEnterEvent * event) {
qDebug() << "WLibrarySidebar::dragEnterEvent" << event->mimeData()->formats();
if (event->mimeData()->hasUrls()) {
+ // We don't have a way to ask the LibraryFeatures whether to accept a
+ // drag so for now we accept all drags. Since almost every
+ // LibraryFeature accepts all files in the drop and accepts playlist
+ // drops we default to those flags to DragAndDropHelper.
QList<QFileInfo> files = DragAndDropHelper::supportedTracksFromUrls(
- event->mimeData()->urls(), true, false);
+ event->mimeData()->urls(), false, true);
if (!files.isEmpty()) {
event->acceptProposedAction();
return;