Bug 222500 - Drag-and-Drop is often triggered accidentally
Summary: Drag-and-Drop is often triggered accidentally
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collection Browser (show other bugs)
Version: 2.3-GIT
Platform: Unlisted Binaries Linux
: HI normal
Target Milestone: 2.3.0
Assignee: Amarok Developers
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2010-01-13 09:31 UTC by Mark Kretschmann
Modified: 2010-02-28 19:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 )