Take offsets in count

svn path=/trunk/KDE/kdebase/apps/; revision=680285
This commit is contained in:
Rafael Fernández López 2007-06-25 20:25:07 +00:00
parent ddf4f82ace
commit db55cad07f

View file

@ -399,8 +399,8 @@ void KListView::Private::drawDraggedItems(QPainter *painter)
option.state &= ~QStyle::State_MouseOver;
foreach (const QModelIndex &index, listView->selectionModel()->selectedIndexes())
{
int dx = mousePosition.x() - initialPressPosition.x();
int dy = mousePosition.y() - initialPressPosition.y();
int dx = mousePosition.x() - initialPressPosition.x() + listView->horizontalOffset();
int dy = mousePosition.y() - initialPressPosition.y() + listView->verticalOffset();
option.rect = visualRect(index);
option.rect.adjust(dx, dy, dx, dy);