mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
disable drop on container item
Change-Id: I4e15374cb900006f820f20dff194e0db69f66140
This commit is contained in:
parent
26857b0750
commit
a775924ee1
Notes:
Deepin Code Review
2016-08-10 06:05:12 +00:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Wed, 10 Aug 2016 06:05:12 +0000 Reviewed-on: https://cr.deepin.io/15070 Project: dde/dde-dock Branch: refs/heads/master
@ -23,8 +23,6 @@ void ContainerItem::dragEnterEvent(QDragEnterEvent *e)
|
||||
|
||||
void ContainerItem::dragMoveEvent(QDragMoveEvent *e)
|
||||
{
|
||||
Q_UNUSED(e);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -135,6 +135,10 @@ void MainPanel::resizeEvent(QResizeEvent *e)
|
||||
|
||||
void MainPanel::dragEnterEvent(QDragEnterEvent *e)
|
||||
{
|
||||
DockItem *item = itemAt(e->pos());
|
||||
if (item && item->itemType() == DockItem::Container)
|
||||
return;
|
||||
|
||||
DockItem *dragSourceItem = qobject_cast<DockItem *>(e->source());
|
||||
if (dragSourceItem)
|
||||
{
|
||||
@ -202,7 +206,7 @@ void MainPanel::dragLeaveEvent(QDragLeaveEvent *e)
|
||||
RequestDockItem = nullptr;
|
||||
}
|
||||
|
||||
if (DragingItem)
|
||||
if (DragingItem && DragingItem->itemType() != DockItem::Plugins)
|
||||
DragingItem->hide();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user