mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
bugfix:drag item outside the dock and release cause item can't request-docked again
Change-Id: Ie6442927fa6043424b37a6575b96c5c0c2602f65
This commit is contained in:
parent
6154520ffa
commit
86bb370595
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: Tue, 22 Sep 2015 15:03:05 +0800 Reviewed-on: https://cr.deepin.io/7248 Project: dde/dde-dock Branch: refs/heads/master
@ -198,6 +198,9 @@ void Panel::initScreenMask()
|
||||
void Panel::onItemDropped()
|
||||
{
|
||||
m_maskWidget->hide();
|
||||
AppItem *item = qobject_cast<AppItem *>(m_appLayout->getDraggingItem());
|
||||
if (item)
|
||||
m_ddam->RequestUndock(item->itemData().id);
|
||||
m_appLayout->clearTmpItem();
|
||||
m_appLayout->relayout();
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ private:
|
||||
|
||||
private:
|
||||
PreviewFrame *m_globalPreview = new PreviewFrame;
|
||||
DBusDockedAppManager *m_ddam = new DBusDockedAppManager(this);
|
||||
DockModeData *m_dockModeData = DockModeData::instance();
|
||||
QPropertyAnimation *m_widthAnimation = NULL;
|
||||
DBusHideStateManager *m_HSManager = NULL;
|
||||
|
@ -132,6 +132,14 @@ QList<AbstractDockItem *> DockLayout::getItemList() const
|
||||
return m_appList;
|
||||
}
|
||||
|
||||
AbstractDockItem *DockLayout::getDraggingItem() const
|
||||
{
|
||||
if (m_dragItemMap.isEmpty())
|
||||
return NULL;
|
||||
else
|
||||
return m_dragItemMap.firstKey();
|
||||
}
|
||||
|
||||
//to recover some damage cause by error
|
||||
//e.g: item has been drag to some place which can't receive drop event cause item miss
|
||||
void DockLayout::restoreTmpItem()
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
int getContentsWidth();
|
||||
int getItemCount() const;
|
||||
QList<AbstractDockItem *> getItemList() const;
|
||||
AbstractDockItem *getDraggingItem() const;
|
||||
|
||||
signals:
|
||||
void startDrag();
|
||||
|
Loading…
x
Reference in New Issue
Block a user