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:
Aaron J. Seigo 2008-01-10 07:28:33 +00:00
parent 67bbd72c67
commit 8c7a064bf8

View File

@ -99,6 +99,8 @@ AppletHandle::AppletHandle(Containment *parent, Applet *applet)
AppletHandle::~AppletHandle()
{
if (m_applet) {
m_applet->removeSceneEventFilter(this);
QRectF rect = QRectF(m_applet->pos(), m_applet->size());
QPointF center = m_applet->mapFromParent(rect.center());
@ -550,12 +552,13 @@ void AppletHandle::startFading(FadeType anim)
qreal time = 250;
if (m_applet) {
m_applet->removeSceneEventFilter(this);
}
if (anim == FadeIn) {
time *= 1.0-m_opacity;
} else {
if (m_applet) {
m_applet->removeSceneEventFilter(this);
}
m_hoverTimer->stop();
time *= m_opacity;
}