some basic guards; much, much more to follow but first must move files around

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738887
This commit is contained in:
Aaron J. Seigo 2007-11-19 22:24:18 +00:00
parent 9b25961432
commit 26098964a9
3 changed files with 10 additions and 3 deletions

View File

@ -128,7 +128,6 @@ void BorderLayout::invalidate()
d->itemPositions[CenterPositioned]->setGeometry(QRectF(
origin + QPointF(left, top), QSizeF(right - left, bottom - top)));
}
}
QSizeF BorderLayout::sizeHint() const

View File

@ -437,7 +437,6 @@ void BoxLayout::setGeometry(const QRectF& geo)
}
d->geometry = geo;
startAnimation();
}

View File

@ -42,7 +42,8 @@ class Layout::Private
bottomMargin(12.0),
spacing(6.0),
parent(p),
animator(0)
animator(0),
relayouting(false)
{
}
@ -56,6 +57,8 @@ class Layout::Private
LayoutItem *parent;
LayoutAnimator *animator;
bool relayouting;
};
@ -92,6 +95,11 @@ void Layout::update()
void Layout::invalidate()
{
if (d->relayouting()) {
return;
}
d->relayouting = true;
// find and update the top level layout
Layout *layout = this;
Layout *parentLayout = 0;
@ -104,6 +112,7 @@ void Layout::invalidate()
} while (parentLayout);
layout->update();
d->relayouting = false;
}