Do not automatically install a scene event filter on items in customcontainments. The custom containment can handle this itself if it feels it appropriate

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=787834
This commit is contained in:
Dan Meltzer 2008-03-19 23:26:21 +00:00
parent 13efb56562
commit 4780390ae2

View File

@ -695,8 +695,7 @@ int Containment::indexAt(const QPointF &pos) const
void Containment::prepareApplet(Applet *applet, bool delayInit) void Containment::prepareApplet(Applet *applet, bool delayInit)
{ {
if (delayInit) { if (delayInit) {
if (containmentType() == DesktopContainment || if (containmentType() == DesktopContainment) {
containmentType() == CustomContainment) {
applet->installSceneEventFilter(this); applet->installSceneEventFilter(this);
} }
} else { } else {
@ -790,8 +789,7 @@ void Containment::appletAnimationComplete(QGraphicsItem *item, Plasma::Phase::An
parent = parent->parentItem(); parent = parent->parentItem();
} }
} else if (anim == Phase::Appear) { } else if (anim == Phase::Appear) {
if ((containmentType() == DesktopContainment || if (containmentType() == DesktopContainment &&
containmentType() == CustomContainment) &&
item->parentItem() == this && item->parentItem() == this &&
qgraphicsitem_cast<Applet*>(item)) { qgraphicsitem_cast<Applet*>(item)) {
item->installSceneEventFilter(this); item->installSceneEventFilter(this);