From 206b07ece1492a2e7a853aa5fd9f4bc24aec875a Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Thu, 15 Nov 2007 09:15:53 +0000 Subject: [PATCH] and now panels set themselves properly again svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=737021 --- view.cpp | 9 +++++++-- view.h | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/view.cpp b/view.cpp index 917d59655..f653d3adb 100644 --- a/view.cpp +++ b/view.cpp @@ -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" diff --git a/view.h b/view.h index 0df32085a..98b2cb96f 100644 --- a/view.h +++ b/view.h @@ -81,6 +81,9 @@ public: */ Containment* containment() const; +protected slots: + void updateSceneRect(); + private: class Private; Private * const d;