Fix popup window position error

Change-Id: Idaaa82afd6d23c62821a63339f54da7c0886dd97
This commit is contained in:
石博文 2017-02-15 17:34:45 +08:00
parent eda20822ca
commit e2e9095d40
Notes: Deepin Code Review 2017-02-16 10:00:15 +08:00
Verified+1: wangyingtao <wangyingtao@deepin.com>
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Thu, 16 Feb 2017 10:00:15 +0800
Reviewed-on: https://cr.deepin.io/20236
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,7 @@ public:
void setInContainer(const bool container);
using DockItem::showContextMenu;
using DockItem::hidePopup;
inline ItemType itemType() const {return Plugins;}

View File

@ -573,8 +573,13 @@ void MainPanel::itemDragStarted()
DragingItem = qobject_cast<DockItem *>(sender());
if (DragingItem->itemType() == DockItem::Plugins)
{
if (static_cast<PluginsItem *>(DragingItem)->allowContainer())
{
qobject_cast<PluginsItem *>(DragingItem)->hidePopup();
m_itemController->setDropping(true);
}
}
QRect rect;
rect.setTopLeft(mapToGlobal(pos()));