┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2012-09-12 19:33:28 +0200
committerEmmanuel Pescosta <[email protected]>2012-09-25 17:06:34 +0200
commitc330be5f5c9e6fe09d1b06869f600a04ac28583e (patch)
tree734b4e318c313f015ed3e791b17a8d9d7c83350f
parenta740120fe157ab2ceb168b90d57204784e606309 (diff)
Fixes Bug 305783 - dragging a file over a directory #c4
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)
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index 41a86324b..5a7175e4c 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -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);