KRUSH: we actually want to set the parent's layout in the Layout ctor, not the BoxLayout. handing out books on OOD seems like a good idea at this point.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=735120
This commit is contained in:
Aaron J. Seigo 2007-11-10 23:16:32 +00:00
parent 4bff9b6912
commit b0ddc4362d
2 changed files with 5 additions and 6 deletions

View File

@ -249,10 +249,6 @@ BoxLayout::BoxLayout(Direction direction , LayoutItem *parent)
: Layout(parent),
d(new Private(this))
{
if (parent) {
parent->setLayout(this);
}
d->direction = direction;
}

View File

@ -35,10 +35,10 @@ namespace Plasma
class Layout::Private
{
public:
Private(LayoutItem* parent)
Private(LayoutItem* p)
: margin(12.0),
spacing(6.0),
parent(parent),
parent(p),
animator(0)
{
}
@ -57,6 +57,9 @@ Layout::Layout(LayoutItem *parent)
: LayoutItem(),
d(new Private(parent))
{
if (parent) {
parent->setLayout(this);
}
}
void Layout::setParent(LayoutItem *parent) {