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());
|
setGeometry(geometry());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Layout::invalidate()
|
void Layout::invalidate()
|
||||||
{
|
{
|
||||||
// find and update the top level layout
|
// find and update the top level layout
|
||||||
|
@ -216,7 +216,7 @@ void Widget::setGeometry(const QRectF& geometry)
|
|||||||
d->size = QSizeF(width, height);
|
d->size = QSizeF(width, height);
|
||||||
|
|
||||||
if (layout()) {
|
if (layout()) {
|
||||||
layout()->setGeometry(boundingRect());
|
layout()->setGeometry(QRectF(QPointF(0, 0), d->size));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (managingLayout()) {
|
if (managingLayout()) {
|
||||||
@ -296,16 +296,14 @@ void Widget::addChild(Widget *w)
|
|||||||
d->childList.append(w);
|
d->childList.append(w);
|
||||||
w->setParentItem(this);
|
w->setParentItem(this);
|
||||||
|
|
||||||
//kDebug() << "Added Child Widget" << w;
|
//kDebug() << "Added Child Widget" << (QObject*)w << "our geom is" << geometry();
|
||||||
|
|
||||||
if (layout()) {
|
if (layout()) {
|
||||||
layout()->addItem(w);
|
layout()->addItem(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
|
//kDebug() << "after the item is added our geom is now" << geometry();
|
||||||
//TODO: is this necessary?
|
|
||||||
w->update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void Widget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user