From c10ddbe353e1a77377ba587ea2dd2448c45d7a8a Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 30 Oct 2007 20:25:12 +0000 Subject: [PATCH] the item is already children of us at this point, just make sure to not double add it. i tried to find a way to reliably react to child add events instead of having to call our own method for this, but due to construction order and how itemChanged events are handled, i couldn't find such a thing. =/ svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=731137 --- widgets/widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/widget.cpp b/widgets/widget.cpp index 14303eaa8..57ca14383 100644 --- a/widgets/widget.cpp +++ b/widgets/widget.cpp @@ -288,7 +288,7 @@ Widget *Widget::parent() const void Widget::addChild(Widget *w) { - if (!w || w->parent() == this) { + if (!w || d->childList.contains(w)) { return; }