Bug 222500

Summary: Drag-and-Drop is often triggered accidentally
Product: [Applications] amarok Reporter: Mark Kretschmann <kretschmann>
Component: Collection BrowserAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: mitchell
Priority: HI Keywords: release_blocker
Version: 2.3-GIT   
Target Milestone: 2.3.0   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mark Kretschmann 2010-01-13 09:31:50 UTC
There is some bug in our home-brew DND detection code, in CollectionTreeView.cpp. It'using a hack with QTimers and measuring distances and other things, and this often goes wrong.

We should really fix this up for 2.2.3, I think.


PS:
I'm not sure who wrote this code originally, I'll CC Jeff as he worked on the PUD code.
Comment 1 Jeff Mitchell 2010-01-13 13:10:05 UTC
I did fix some bugs with DND in the collection browser, but I'm sure there are more. Qt has some problems in this area that we end up having to hack around.
Comment 2 Kevin Funk 2010-02-28 19:49:19 UTC
commit 296415c88a3aeca7df1446c9279aa3512a81052c
Author: Kevin Funk <krf@electrostorm.net>
Date:   Sun Feb 28 18:39:57 2010 +0100

    Fix odd behaviour when doing drag-and-drop from Collection browser.
    BUG: 222500

diff --git a/ChangeLog b/ChangeLog
index 16a12ad..20bc152 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,8 @@ VERSION 2.3
       last check.
 
   BUGFIXES:
+    * Fixed odd behaviour when doing drag-and-drop from Collection browser.
+      (BR 222500)
     * Show artist and title instead of raw track ID when copying/deleting
       tracks on an MTP device.
     * Fixed time labels getting truncated in the slim toolbar. (BR 195935)
diff --git a/src/browsers/CollectionTreeView.cpp b/src/browsers/CollectionTreeView.cpp
index c84c9d6..9332a8d 100644
--- a/src/browsers/CollectionTreeView.cpp
+++ b/src/browsers/CollectionTreeView.cpp
@@ -375,10 +375,8 @@ void CollectionTreeView::mouseMoveEvent( QMouseEvent *event )
     {
         m_clickTimer.stop();
         slotClickTimeout();
-        event->accept();
     }
-    else
-        Amarok::PrettyTreeView::mouseMoveEvent( event );
+    event->accept();
 }
 
 CollectionTreeItem* CollectionTreeView::getItemFromIndex( QModelIndex &index )