From: Rafael Fernández López Date: Tue, 18 Dec 2007 21:04:26 +0000 (+0000) Subject: So I guess that is the behaviour that we really want :) X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/665ca266e9a6cedb1a014b730e64c91f3c57e11d So I guess that is the behaviour that we really want :) CCMAIL: peter.penz@gmx.at svn path=/trunk/KDE/kdebase/apps/; revision=750173 --- diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp index 9a500df6b..75d83bd0f 100644 --- a/src/dolphincolumnwidget.cpp +++ b/src/dolphincolumnwidget.cpp @@ -247,6 +247,11 @@ void DolphinColumnWidget::dragMoveEvent(QDragMoveEvent* event) } } setDirtyRegion(m_dropRect); + + if (event->mimeData()->hasUrls()) { + // accept url drops, independently from the destination item + event->acceptProposedAction(); + } } void DolphinColumnWidget::dropEvent(QDropEvent* event) diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 46752fc95..886f3f9a6 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -278,6 +278,11 @@ void DolphinDetailsView::dragMoveEvent(QDragMoveEvent* event) } setDirtyRegion(m_dropRect); } + + if (event->mimeData()->hasUrls()) { + // accept url drops, independently from the destination item + event->acceptProposedAction(); + } } void DolphinDetailsView::dropEvent(QDropEvent* event) diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 05b8ed9cc..de0aaec97 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -227,8 +227,10 @@ void DolphinIconsView::dragMoveEvent(QDragMoveEvent* event) m_dropRect.setSize(QSize()); // set as invalid if (index.isValid()) { const KFileItem item = itemForIndex(index); - if (!item.isNull()) { + if (!item.isNull() && item.isDir()) { m_dropRect = visualRect(index); + } else { + m_dropRect.setSize(QSize()); // set as invalid } } if (event->mimeData()->hasUrls()) {