mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
bugfix: drop active item outside dock cause item overlap
Change-Id: Id3ebcc9c74b21d9b86f946e112a84bcd5e8105f7
This commit is contained in:
parent
065b943b92
commit
b6f92bac4c
Notes:
Deepin Code Review
2016-06-14 07:19:47 +00:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: <mr.asianwang@gmail.com> Submitted-by: <mr.asianwang@gmail.com> Submitted-at: Fri, 23 Oct 2015 09:42:12 +0800 Reviewed-on: https://cr.deepin.io/8014 Project: dde/dde-dock Branch: refs/heads/master
@ -74,6 +74,7 @@ signals:
|
||||
void needPreviewImmediatelyHide();
|
||||
void needPreviewShow(QPoint pos);
|
||||
void needPreviewUpdate();
|
||||
void requestAnimationFinish();
|
||||
|
||||
protected:
|
||||
bool m_moveable = true;
|
||||
|
@ -30,6 +30,8 @@ void AppItem::moveWithAnimation(QPoint targetPos, int duration)
|
||||
animation->start();
|
||||
connect(animation, &QPropertyAnimation::finished, this, &AppItem::moveAnimationFinished);
|
||||
connect(animation, &QPropertyAnimation::finished, animation, &QPropertyAnimation::deleteLater);
|
||||
connect(this, &AppItem::requestAnimationFinish, animation, &QPropertyAnimation::stop);
|
||||
connect(this, &AppItem::requestAnimationFinish, animation, &QPropertyAnimation::deleteLater);
|
||||
}
|
||||
|
||||
AppItemData AppItem::itemData() const
|
||||
|
@ -335,6 +335,7 @@ void DockLayout::sortLeftToRight()
|
||||
for (int i = 0; i < m_appList.count(); i ++)
|
||||
{
|
||||
AbstractDockItem * toItem = m_appList.at(i);
|
||||
toItem->requestAnimationFinish();//make sure the move-animation stop for resort
|
||||
|
||||
int nextX = 0;
|
||||
int nextY = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user