mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: Popup Applet not hide when item removed
Change-Id: Ib698c731418a2a0d64739acae3c1bf14add1b8dc
This commit is contained in:
parent
0a0b60aa5f
commit
0e9d9df0e5
Notes:
gerrit
2018-03-27 11:19:24 +00:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: Rekols <rekols@foxmail.com> Verified+1: <yefei@linuxdeepin.com> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Tue, 27 Mar 2018 11:19:24 +0000 Reviewed-on: https://cr.deepin.io/33076 Project: dde/dde-dock Branch: refs/heads/master
@ -329,6 +329,8 @@ void DockItemController::pluginItemInserted(PluginsItem *item)
|
||||
|
||||
void DockItemController::pluginItemRemoved(PluginsItem *item)
|
||||
{
|
||||
item->hidePopup();
|
||||
|
||||
if (m_containerItem->contains(item))
|
||||
m_containerItem->removeItem(item);
|
||||
else
|
||||
|
@ -123,7 +123,13 @@ bool DockPopupWindow::eventFilter(QObject *o, QEvent *e)
|
||||
|
||||
// FIXME: ensure position move after global mouse release event
|
||||
if (isVisible())
|
||||
QTimer::singleShot(10, this, [=] { show(m_lastPoint, m_model); });
|
||||
{
|
||||
QTimer::singleShot(10, this, [=] {
|
||||
// NOTE(sbw): double check is necessary, in this time, the popup maybe already hided.
|
||||
if (isVisible())
|
||||
show(m_lastPoint, m_model);
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user