From 93bf2933e456608cf7465f73fc7de0cad6f72006 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Fri, 17 Aug 2007 16:28:54 +0000 Subject: [PATCH] When updating a Widget's geometry, pass the geometry in the Widget's co-ordinates to layout()->setGeometry() rather than the parent widget's co-ordinates. Call updateGeometry() inside setGeometry(). svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701207 --- widgets/widget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/widget.cpp b/widgets/widget.cpp index 5d8a21d67..01e03800e 100644 --- a/widgets/widget.cpp +++ b/widgets/widget.cpp @@ -165,6 +165,7 @@ void Widget::setGeometry(const QRectF& geometry) d->size = QSizeF(width, height); + updateGeometry(); } setPos(geometry.topLeft()); @@ -177,7 +178,7 @@ void Widget::updateGeometry() if (layout()) { // kDebug() << (void *) this << " updating geometry to " << size(); - layout()->setGeometry(geometry()); + layout()->setGeometry(boundingRect()); } }