mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
bugfix: drag in a small area will change item's position
Change-Id: Id6a114351a5103f1f6686a3f5c5d4fd92c1dcaa4
This commit is contained in:
parent
b10111dffd
commit
787c259f20
Notes:
Deepin Code Review
2016-06-14 07:19:47 +00:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: Hualet Wang <mr.asianwang@gmail.com> Submitted-by: Hualet Wang <mr.asianwang@gmail.com> Submitted-at: Wed, 26 Aug 2015 18:20:40 +0800 Reviewed-on: https://cr.deepin.io/6604 Project: dde/dde-dock Branch: refs/heads/master
@ -42,6 +42,10 @@ void DockLayout::insertItem(AbstractDockItem *item, int index)
|
||||
m_ddam->Sort(itemsIdList());
|
||||
|
||||
relayout();
|
||||
|
||||
//reset state
|
||||
m_movingLeftward = true;
|
||||
m_animationItemCount = 0;
|
||||
}
|
||||
|
||||
void DockLayout::moveItem(int from, int to)
|
||||
@ -142,7 +146,6 @@ void DockLayout::restoreTmpItem()
|
||||
}
|
||||
|
||||
emit itemDropped();
|
||||
m_animationItemCount = 0;
|
||||
}
|
||||
|
||||
void DockLayout::clearTmpItem()
|
||||
|
@ -85,7 +85,7 @@ private:
|
||||
QPoint m_lastPost = QPoint(0,0);
|
||||
int m_lastHoverIndex = -1;
|
||||
int m_animationItemCount = 0;
|
||||
bool m_movingLeftward = false;
|
||||
bool m_movingLeftward = true;
|
||||
|
||||
const int MOVE_ANIMATION_DURATION_BASE = 300;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user