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) {
|
if (target) {
|
||||||
setZValue(target->zValue() - 1);
|
setZValue(target->zValue() - 1);
|
||||||
setParentItem(target->parentItem());
|
setParentItem(target->parentItem());
|
||||||
@ -159,10 +160,7 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
|
|||||||
connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(targetDestroyed(QObject*)));
|
connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(targetDestroyed(QObject*)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
d->target = target;
|
|
||||||
} else {
|
} else {
|
||||||
d->target = 0;
|
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user