diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2015-01-02 00:01:07 +0100 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2015-01-02 00:01:07 +0100 |
commit | 4fb09a915df5dc42dd62973e5da35a1cc7b04610 (patch) | |
tree | d7c8d9e8b7ee7c81b9588f78e748c5849a29b7d0 /src/widget/wlibrarysidebar.cpp | |
parent | 6329431cde7959a94cdf9c755550afae78157d0b (diff) |
Speed up drop to library oprations
Diffstat (limited to 'src/widget/wlibrarysidebar.cpp')
-rw-r--r-- | src/widget/wlibrarysidebar.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/widget/wlibrarysidebar.cpp b/src/widget/wlibrarysidebar.cpp index cccef41693..a32f021732 100644 --- a/src/widget/wlibrarysidebar.cpp +++ b/src/widget/wlibrarysidebar.cpp @@ -84,13 +84,17 @@ void WLibrarySidebar::dragMoveEvent(QDragMoveEvent * event) { SidebarModel* sidebarModel = dynamic_cast<SidebarModel*>(model()); bool accepted = true; if (sidebarModel) { + accepted = false; foreach (QUrl url, urls) { QModelIndex destIndex = this->indexAt(event->pos()); - if (!sidebarModel->dragMoveAccept(destIndex, url)) { - //We only need one URL to be invalid for us - //to reject the whole drag... - //(eg. you may have tried to drag two MP3's and an EXE) - accepted = false; + if (sidebarModel->dragMoveAccept(destIndex, url)) { + // We only need one URL to be valid for us + // to accept the whole drag... + // consider we have a long list of valid files, checking all will + // take a lot of time that stales Mixxx and this makes the drop feature useless + // Eg. you may have tried to drag two MP3's and an EXE, the drop is accepted here, + // but the EXE is sorted out later after dropping + accepted = true; break; } } |