mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
Only move the items if at least one direction is within the item size
This commit is contained in:
parent
e283a9f7d9
commit
03bed41e73
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue