diff options
| author | Peter Penz <[email protected]> | 2007-10-30 19:44:55 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-10-30 19:44:55 +0000 |
| commit | d9f5e191a6bd32a4dc15b3a3eb34795cda7697dd (patch) | |
| tree | 0d03dac95431421dd5045a09f8c1e921098df3b6 /src/dolphindetailsview.cpp | |
| parent | 65c11d72c949695143023641e59f2d1bb645d39d (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/dolphindetailsview.cpp')
| -rw-r--r-- | src/dolphindetailsview.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index ee123b65c..e55c2582d 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -249,7 +249,11 @@ void DolphinDetailsView::dragMoveEvent(QDragMoveEvent* event) m_dragging = false; } else { m_dragging = true; - m_dropRect = visualRect(index); + if (itemForIndex(index).isDir()) { + m_dropRect = visualRect(index); + } else { + m_dropRect.setSize(QSize()); // set as invalid + } setDirtyRegion(m_dropRect); } } @@ -260,13 +264,13 @@ void DolphinDetailsView::dropEvent(QDropEvent* event) if (!urls.isEmpty()) { event->acceptProposedAction(); const QModelIndex index = indexAt(event->pos()); + KFileItem item; if (index.isValid() && (index.column() == DolphinModel::Name)) { - const KFileItem item = itemForIndex(index); - m_controller->indicateDroppedUrls(urls, - m_controller->url(), - item, - event->source()); + item = itemForIndex(index); } + m_controller->indicateDroppedUrls(urls, + m_controller->url(), + item); } QTreeView::dropEvent(event); m_dragging = false; |
