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
This commit is contained in:
Aaron J. Seigo 2007-10-30 20:25:12 +00:00
parent 6a826c0150
commit c10ddbe353

View File

@ -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;
}