Only move the items if at least one direction is within the item size

This commit is contained in:
Peter Penz 2012-01-30 14:06:07 +01:00
parent e283a9f7d9
commit 03bed41e73

View file

@ -1457,8 +1457,8 @@ bool KItemListView::moveWidget(KItemListWidget* widget, const QPointF& newPos)
const bool startMovingAnim = xMax <= 0
|| yMax <= 0
|| qAbs(oldPos.x() - newPos.x()) <= xMax
|| qAbs(oldPos.y() - newPos.y()) <= yMax;
|| qAbs(oldPos.x() - newPos.x()) < xMax
|| qAbs(oldPos.y() - newPos.y()) < yMax;
if (startMovingAnim) {
// The moving animation is done inside a column or a row.
m_animation->start(widget, KItemListViewAnimation::MovingAnimation, newPos);