diff options
Diffstat (limited to 'src/dolphindetailsview.cpp')
| -rw-r--r-- | src/dolphindetailsview.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 46752fc95..f58b4cd1e 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -278,6 +278,20 @@ void DolphinDetailsView::dragMoveEvent(QDragMoveEvent* event) } setDirtyRegion(m_dropRect); } + + bool destIsDir = false; + if (index.isValid()) { + const KFileItem item = itemForIndex(index); + if (!item.isNull() && item.isDir()) { + m_dropRect = visualRect(index); + destIsDir = true; + } + } else { // dropping on viewport + destIsDir = true; + } + if (destIsDir && event->mimeData()->hasUrls()) { + event->acceptProposedAction(); + } } void DolphinDetailsView::dropEvent(QDropEvent* event) |
