remove the event filter on both re-show (just in case) and on dtor (prevents a crash)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=759161
This commit is contained in:
parent
67bbd72c67
commit
8c7a064bf8
@ -99,6 +99,8 @@ AppletHandle::AppletHandle(Containment *parent, Applet *applet)
|
|||||||
AppletHandle::~AppletHandle()
|
AppletHandle::~AppletHandle()
|
||||||
{
|
{
|
||||||
if (m_applet) {
|
if (m_applet) {
|
||||||
|
m_applet->removeSceneEventFilter(this);
|
||||||
|
|
||||||
QRectF rect = QRectF(m_applet->pos(), m_applet->size());
|
QRectF rect = QRectF(m_applet->pos(), m_applet->size());
|
||||||
QPointF center = m_applet->mapFromParent(rect.center());
|
QPointF center = m_applet->mapFromParent(rect.center());
|
||||||
|
|
||||||
@ -550,12 +552,13 @@ void AppletHandle::startFading(FadeType anim)
|
|||||||
|
|
||||||
qreal time = 250;
|
qreal time = 250;
|
||||||
|
|
||||||
|
if (m_applet) {
|
||||||
|
m_applet->removeSceneEventFilter(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (anim == FadeIn) {
|
if (anim == FadeIn) {
|
||||||
time *= 1.0-m_opacity;
|
time *= 1.0-m_opacity;
|
||||||
} else {
|
} else {
|
||||||
if (m_applet) {
|
|
||||||
m_applet->removeSceneEventFilter(this);
|
|
||||||
}
|
|
||||||
m_hoverTimer->stop();
|
m_hoverTimer->stop();
|
||||||
time *= m_opacity;
|
time *= m_opacity;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user