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:
parent
76dfb7c57e
commit
7ad7bfd634
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user