set d->target sooner so that the code in setTarget(QRectF) works properly

svn path=/trunk/KDE/kdelibs/; revision=1026219
This commit is contained in:
Aaron J. Seigo 2009-09-21 06:17:04 +00:00
parent 76dfb7c57e
commit 7ad7bfd634

View File

@ -138,6 +138,7 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
}
}
d->target = target;
if (target) {
setZValue(target->zValue() - 1);
setParentItem(target->parentItem());
@ -159,10 +160,7 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(targetDestroyed(QObject*)));
}
}
d->target = target;
} else {
d->target = 0;
hide();
}
}