mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
The order is important, also is important to accept the event on the move event. While on the dock tree view we were always getting a forbidden cursor with no
possibility to drop, now we can nicely drop :) CCMAIL: peter.penz@gmx.at svn path=/trunk/KDE/kdebase/apps/; revision=750176
This commit is contained in:
parent
665ca266e9
commit
2446dd16e8
1 changed files with 8 additions and 1 deletions
|
@ -106,10 +106,12 @@ void SidebarTreeView::startDrag(Qt::DropActions supportedActions)
|
|||
|
||||
void SidebarTreeView::dragEnterEvent(QDragEnterEvent* event)
|
||||
{
|
||||
QTreeView::dragEnterEvent(event);
|
||||
|
||||
if (event->mimeData()->hasUrls()) {
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
QTreeView::dragEnterEvent(event);
|
||||
|
||||
m_dragging = true;
|
||||
}
|
||||
|
||||
|
@ -131,6 +133,11 @@ void SidebarTreeView::dragMoveEvent(QDragMoveEvent* event)
|
|||
setDirtyRegion(m_dropRect);
|
||||
m_dropRect = visualRect(index);
|
||||
setDirtyRegion(m_dropRect);
|
||||
|
||||
if (event->mimeData()->hasUrls()) {
|
||||
// accept url drops, independently from the destination item
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
}
|
||||
|
||||
void SidebarTreeView::dropEvent(QDropEvent* event)
|
||||
|
|
Loading…
Reference in a new issue