Try harder to find the containment
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=737050
This commit is contained in:
parent
6aa793e6a8
commit
7a333aee4c
@ -846,7 +846,14 @@ FormFactor Applet::formFactor() const
|
||||
|
||||
Containment* Applet::containment() const
|
||||
{
|
||||
return dynamic_cast<Containment*>(parentItem());
|
||||
QGraphicsItem *parent = parentItem();
|
||||
while (parent) {
|
||||
if (dynamic_cast<Containment*>(parent)) {
|
||||
break;
|
||||
}
|
||||
parent = parent->parentItem();
|
||||
}
|
||||
return dynamic_cast<Containment*>(parent);
|
||||
}
|
||||
|
||||
Location Applet::location() const
|
||||
|
Loading…
Reference in New Issue
Block a user