and now panels set themselves properly again

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=737021
This commit is contained in:
Aaron J. Seigo 2007-11-15 09:15:53 +00:00
parent 58d7e745f9
commit 206b07ece1
2 changed files with 10 additions and 2 deletions

View File

@ -66,8 +66,8 @@ View::View(Containment *containment, QWidget *parent)
: QGraphicsView(parent),
d(new Private)
{
d->containment = containment;
setScene(containment->scene());
setContainment(containment);
}
View::~View()
@ -101,7 +101,7 @@ void View::setContainment(Containment *containment)
disconnect(d->containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect()));
d->containment = containment;
d->screen = containment->screen();
setSceneRect(containment->geometry());
updateSceneRect();
connect(containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect()));
}
@ -120,6 +120,11 @@ bool View::drawWallpaper() const
return d->drawWallpaper;
}
void View::updateSceneRect()
{
setSceneRect(d->containment->sceneBoundingRect());
}
} // namespace Plasma
#include "view.moc"

3
view.h
View File

@ -81,6 +81,9 @@ public:
*/
Containment* containment() const;
protected slots:
void updateSceneRect();
private:
class Private;
Private * const d;