From 7a333aee4cd08c5b20c710399dfedaa03b692a86 Mon Sep 17 00:00:00 2001 From: Andre Duffeck Date: Thu, 15 Nov 2007 11:01:17 +0000 Subject: [PATCH] Try harder to find the containment svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=737050 --- applet.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/applet.cpp b/applet.cpp index 0ed3b3931..016174ca3 100644 --- a/applet.cpp +++ b/applet.cpp @@ -846,7 +846,14 @@ FormFactor Applet::formFactor() const Containment* Applet::containment() const { - return dynamic_cast(parentItem()); + QGraphicsItem *parent = parentItem(); + while (parent) { + if (dynamic_cast(parent)) { + break; + } + parent = parent->parentItem(); + } + return dynamic_cast(parent); } Location Applet::location() const