diff options
| author | Peter Penz <[email protected]> | 2012-05-28 23:10:20 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-05-28 23:11:52 +0200 |
| commit | 4e2f3dcffe2c2388e9d2d63e626ee6d03abce953 (patch) | |
| tree | 7249e8bfda0cbec3d913abfdefdf6deb93d9d134 /src/kitemviews/kitemlistview.cpp | |
| parent | 276100dcecf19b8037d4da37109c1f8fe6d85459 (diff) | |
Implement dropping of items into the Places Panel
Some polishing regarding the icons and group-alignment must still
be done, but at least the basic functionality is back again.
Diffstat (limited to 'src/kitemviews/kitemlistview.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistview.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index ee69c8990..5f4c54606 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -1616,6 +1616,11 @@ void KItemListView::doLayout(LayoutAnimationHint hint, int changedIndex, int cha } if (animate) { + if (m_animation->isStarted(widget, KItemListViewAnimation::MovingAnimation)) { + m_animation->start(widget, KItemListViewAnimation::MovingAnimation, newPos); + applyNewPos = false; + } + const bool itemsRemoved = (changedCount < 0); const bool itemsInserted = (changedCount > 0); if (itemsRemoved && (i >= changedIndex + changedCount + 1)) { @@ -2330,7 +2335,8 @@ int KItemListView::showDropIndicator(const QPointF& pos) } } - return -1; + const QRectF firstItemRect = itemRect(firstVisibleIndex()); + return (pos.y() <= firstItemRect.top()) ? 0 : -1; } void KItemListView::hideDropIndicator() |
