install event filters for new target again
svn path=/trunk/KDE/kdelibs/; revision=1028104
This commit is contained in:
parent
d9d71fcb93
commit
1d1cd9ab47
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user