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:
Rafael Fernández López 2007-12-18 20:17:57 +00:00
parent 00bded7c8d
commit 0ae60ef79b
2 changed files with 28 additions and 0 deletions

View file

@ -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)

View file

@ -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)