]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fixes Bug 305783 - dragging a file over a directory #c4
authorEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Wed, 12 Sep 2012 17:33:28 +0000 (19:33 +0200)
committerEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Tue, 25 Sep 2012 15:06:34 +0000 (17:06 +0200)
     does not expand the dir => Bug discovered: When you drag a
     item onto a folder-view-item and then move it away
     instantly before the autoactivation event is triggered
     (After 750ms), the folder will be opened anyway.

BUG: 305783
REVIEW: 106381
FIXED-IN: 4.9.2
(cherry picked from commit 9ab8bcd6aa3ce5d96ee380d5f22d77c2f0a38881)

src/kitemviews/kitemlistcontroller.cpp

index 41a86324bb1f612a0ca81b122cb3aeccb8e09cab..5a7175e4ccc628617aedbd353c97299c4d645e24 100644 (file)
@@ -489,7 +489,16 @@ void KItemListController::slotAutoActivationTimeout()
         return;
     }
 
-    if (m_model->supportsDropping(index)) {
+    /* m_view->isUnderMouse() fixes a bug in the Folder-View-Panel and in the
+     * Places-Panel.
+     *
+     * Bug: When you drag a file onto a Folder-View-Item or a Places-Item and
+     * then move away before the auto-activation timeout triggers, than the
+     * item still becomes activated/expanded.
+     *
+     * See Bug 293200 and 305783
+     */
+    if (m_model->supportsDropping(index) && m_view->isUnderMouse()) {
         if (m_view->supportsItemExpanding() && m_model->isExpandable(index)) {
             const bool expanded = m_model->isExpanded(index);
             m_model->setExpanded(index, !expanded);