┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphiniconsview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-10-30 19:44:55 +0000
committerPeter Penz <[email protected]>2007-10-30 19:44:55 +0000
commitd9f5e191a6bd32a4dc15b3a3eb34795cda7697dd (patch)
tree0d03dac95431421dd5045a09f8c1e921098df3b6 /src/dolphiniconsview.cpp
parent65c11d72c949695143023641e59f2d1bb645d39d (diff)
* fixed drag & drop issue in column view (dropping on files was not possible -> handled as viewport now)
* only show the hover-drop-indicator on directories (dropping on file-items is handled like dropping on the viewport) * simplified signature of drop signal (source widget not required anymore) svn path=/trunk/KDE/kdebase/apps/; revision=731129
Diffstat (limited to 'src/dolphiniconsview.cpp')
-rw-r--r--src/dolphiniconsview.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp
index 30e47da89..eb3aa13c6 100644
--- a/src/dolphiniconsview.cpp
+++ b/src/dolphiniconsview.cpp
@@ -188,7 +188,11 @@ void DolphinIconsView::dragMoveEvent(QDragMoveEvent* event)
// TODO: remove this code when the issue #160611 is solved in Qt 4.4
const QModelIndex index = indexAt(event->pos());
setDirtyRegion(m_dropRect);
- m_dropRect = visualRect(index);
+ if (itemForIndex(index).isDir()) {
+ m_dropRect = visualRect(index);
+ } else {
+ m_dropRect.setSize(QSize()); // set as invalid
+ }
setDirtyRegion(m_dropRect);
}
@@ -198,14 +202,11 @@ void DolphinIconsView::dropEvent(QDropEvent* event)
const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData());
if (!urls.isEmpty()) {
const QModelIndex index = indexAt(event->pos());
- if (index.isValid()) {
- const KFileItem item = itemForIndex(index);
- m_controller->indicateDroppedUrls(urls,
- m_controller->url(),
- item,
- event->source());
- event->acceptProposedAction();
- }
+ const KFileItem item = itemForIndex(index);
+ m_controller->indicateDroppedUrls(urls,
+ m_controller->url(),
+ item);
+ event->acceptProposedAction();
}
}