change a bit the logic of when show the animation or not
svn path=/trunk/KDE/kdelibs/; revision=1065286
This commit is contained in:
parent
2ec6326d77
commit
3c69761d55
@ -102,7 +102,7 @@ void ItemBackground::setTarget(const QRectF &newGeometry)
|
||||
d->oldGeometry = geometry();
|
||||
d->newGeometry = newGeometry;
|
||||
|
||||
if (!isVisible() && (!d->target || !d->target->isVisible())) {
|
||||
if (!isVisible() || (d->target && !d->target->isVisible())) {
|
||||
setGeometry(d->newGeometry);
|
||||
targetReached(newGeometry);
|
||||
if (d->target) {
|
||||
@ -169,8 +169,10 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
|
||||
|
||||
QRectF rect = target->boundingRect();
|
||||
rect.moveTopLeft(mapToParent(mapFromScene(target->mapToScene(QPointF(0, 0)))));
|
||||
|
||||
setTarget(rect);
|
||||
|
||||
|
||||
if (newTarget) {
|
||||
QObject *obj = 0;
|
||||
if (target->isWidget()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user