avoid unecessary updates, use d->size consistently so problem, if they arise, show up more consistently ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738038
This commit is contained in:
parent
e5dca92fdf
commit
d9493e73ef
@ -83,6 +83,7 @@ void Layout::update()
|
||||
{
|
||||
setGeometry(geometry());
|
||||
}
|
||||
|
||||
void Layout::invalidate()
|
||||
{
|
||||
// find and update the top level layout
|
||||
|
@ -216,7 +216,7 @@ void Widget::setGeometry(const QRectF& geometry)
|
||||
d->size = QSizeF(width, height);
|
||||
|
||||
if (layout()) {
|
||||
layout()->setGeometry(boundingRect());
|
||||
layout()->setGeometry(QRectF(QPointF(0, 0), d->size));
|
||||
}
|
||||
|
||||
if (managingLayout()) {
|
||||
@ -296,16 +296,14 @@ void Widget::addChild(Widget *w)
|
||||
d->childList.append(w);
|
||||
w->setParentItem(this);
|
||||
|
||||
//kDebug() << "Added Child Widget" << w;
|
||||
//kDebug() << "Added Child Widget" << (QObject*)w << "our geom is" << geometry();
|
||||
|
||||
if (layout()) {
|
||||
layout()->addItem(w);
|
||||
}
|
||||
|
||||
updateGeometry();
|
||||
|
||||
//TODO: is this necessary?
|
||||
w->update();
|
||||
//kDebug() << "after the item is added our geom is now" << geometry();
|
||||
}
|
||||
|
||||
void Widget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
|
Loading…
x
Reference in New Issue
Block a user