fix popup window appear when hover another item

Change-Id: Idedca65d00e626c30c0760cd31f233006f3b0bda
This commit is contained in:
石博文 2016-08-04 17:36:38 +08:00
parent 66f9aff697
commit 7052ba06e1
Notes: Deepin Code Review 2016-08-08 06:36:06 +00:00
Verified+1: Anonymous Coward #1000004
Verified+1: <wangyanli@linuxdeepin.com>
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Mon, 08 Aug 2016 06:36:06 +0000
Reviewed-on: https://cr.deepin.io/14924
Project: dde/dde-dock
Branch: refs/heads/master

View File

@ -94,19 +94,19 @@ void DockItem::enterEvent(QEvent *e)
void DockItem::leaveEvent(QEvent *e)
{
QWidget::leaveEvent(e);
m_hover = false;
m_popupTipsDelayTimer->stop();
// auto hide if popup is not model window
if (!PopupWindow->model())
if (m_popupShown && !PopupWindow->model())
{
m_popupShown = false;
PopupWindow->hide();
}
update();
return QWidget::leaveEvent(e);
}
const QRect DockItem::perfectIconRect() const