mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix animation playing but background not clear
Change-Id: I406be2b08c693e1cc390f378a81449391822b975
This commit is contained in:
parent
6725009933
commit
0fcfeb7a12
Notes:
gerrit
2018-05-16 14:29:45 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: sbwtw <sbw@sbw.so> Submitted-by: sbwtw <sbw@sbw.so> Submitted-at: Wed, 16 May 2018 14:29:45 +0800 Reviewed-on: https://cr.deepin.io/34773 Project: dde/dde-dock Branch: refs/heads/master
@ -641,20 +641,14 @@ void AppItem::playSwingEffect()
|
||||
|
||||
void AppItem::stopSwingEffect()
|
||||
{
|
||||
// NOTE(hualet): return immediatly if animation is not running,
|
||||
// because operations on QGraphicsScenes are very expensive,
|
||||
// especially when we do one of startSwingEffect/stopSwingEffect
|
||||
// in updateWindowInfos which happens very often.
|
||||
if (!m_swingEffectView->isVisible())
|
||||
return;
|
||||
|
||||
// stop swing effect
|
||||
m_swingEffectView->setVisible(false);
|
||||
|
||||
if (m_itemAnimation.timeLine())
|
||||
if (m_itemAnimation.timeLine() && m_itemAnimation.timeLine()->state() != QTimeLine::NotRunning)
|
||||
m_itemAnimation.timeLine()->stop();
|
||||
m_itemAnimation.clear();
|
||||
m_itemScene->clear();
|
||||
if (!m_itemScene->items().isEmpty())
|
||||
m_itemScene->clear();
|
||||
}
|
||||
|
||||
void AppItem::checkAttentionEffect()
|
||||
|
Loading…
x
Reference in New Issue
Block a user