Prevent endless scrolling of list when dragging items

BUG: 295584
FIXED-IN: 4.8.2
This commit is contained in:
Peter Penz 2012-03-09 17:57:19 +01:00
parent 1d9074249f
commit 879f8aacb1
2 changed files with 3 additions and 1 deletions

View file

@ -732,6 +732,8 @@ bool KItemListController::dragLeaveEvent(QGraphicsSceneDragDropEvent* event, con
Q_UNUSED(event);
Q_UNUSED(transform);
m_view->setAutoScroll(false);
KItemListWidget* widget = hoveredWidget();
if (widget) {
widget->setHovered(false);
@ -785,6 +787,7 @@ bool KItemListController::dropEvent(QGraphicsSceneDragDropEvent* event, const QT
}
m_autoActivationTimer->stop();
m_view->setAutoScroll(false);
const QPointF pos = transform.map(event->pos());
const int index = m_view->itemAt(pos);

View file

@ -299,7 +299,6 @@ void KItemListView::setAutoScroll(bool enabled)
delete m_autoScrollTimer;
m_autoScrollTimer = 0;
}
}
bool KItemListView::autoScroll() const