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/dolphincolumnwidget.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/dolphincolumnwidget.cpp')
| -rw-r--r-- | src/dolphincolumnwidget.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp index c212e6ad8..e2670f10d 100644 --- a/src/dolphincolumnwidget.cpp +++ b/src/dolphincolumnwidget.cpp @@ -222,7 +222,11 @@ void DolphinColumnWidget::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); } @@ -231,14 +235,11 @@ void DolphinColumnWidget::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_view->m_controller->indicateDroppedUrls(urls, - url(), - item, - event->source()); - event->acceptProposedAction(); - } + const KFileItem item = itemForIndex(index); + m_view->m_controller->indicateDroppedUrls(urls, + url(), + item); + event->acceptProposedAction(); } QListView::dropEvent(event); m_dragging = false; |
