install event filters for new target again

svn path=/trunk/KDE/kdelibs/; revision=1028104
This commit is contained in:
Giulio Camuffo 2009-09-25 21:28:07 +00:00
parent d9d71fcb93
commit 1d1cd9ab47

View File

@ -138,6 +138,7 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
}
}
bool newTarget = (d->target != target);
d->target = target;
if (target) {
setZValue(target->zValue() - 1);
@ -146,7 +147,7 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
rect.moveTopLeft(target->pos());
setTarget(rect);
if (d->target != target) {
if (newTarget) {
QObject *obj = 0;
if (target->isWidget()) {
obj = static_cast<QGraphicsWidget*>(target);