mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Keep consistent all views. Peter, if you decide to revert the change that David did on dolphiniconsview, do the revert here too. It really makes things very clear this
way. Anyway, detailed and columns view were buggy since it did never accept the dragging events, so you were never able to drop on the detailed or column view. CCMAIL: peter.penz@gmx.at CCMAIL: faure@kde.org svn path=/trunk/KDE/kdebase/apps/; revision=750155
This commit is contained in:
parent
00bded7c8d
commit
0ae60ef79b
2 changed files with 28 additions and 0 deletions
|
@ -247,6 +247,20 @@ void DolphinColumnWidget::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 DolphinColumnWidget::dropEvent(QDropEvent* event)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue