make sure to disconnect the _old_ target from the itembackground, not the new one with itself
svn path=/trunk/KDE/kdelibs/; revision=1025709
This commit is contained in:
parent
1b05349652
commit
94b684c01c
@ -127,14 +127,14 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
|
|||||||
d->target->removeSceneEventFilter(this);
|
d->target->removeSceneEventFilter(this);
|
||||||
|
|
||||||
QObject *obj = 0;
|
QObject *obj = 0;
|
||||||
if (target && target->isWidget()) {
|
if (d->target->isWidget()) {
|
||||||
obj = static_cast<QGraphicsWidget*>(target);
|
obj = static_cast<QGraphicsWidget*>(d->target);
|
||||||
} else {
|
} else {
|
||||||
obj = dynamic_cast<QObject *>(target);
|
obj = dynamic_cast<QObject *>(d->target);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj) {
|
if (obj) {
|
||||||
disconnect(obj, 0, obj, 0);
|
disconnect(obj, 0, this, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user