Fix bug 184930.
The containment's screen can change after it is initially created, so make sure it is changed in the view as well. svn path=/trunk/KDE/kdelibs/; revision=931126
This commit is contained in:
parent
a82716d835
commit
497fae72fe
8
view.cpp
8
view.cpp
@ -95,6 +95,12 @@ public:
|
||||
containment = 0;
|
||||
}
|
||||
|
||||
void containmentScreenChanged(int wasScreen, int newScreen, Plasma::Containment *containment)
|
||||
{
|
||||
lastScreen = newScreen;
|
||||
lastDesktop = this->containment->desktop();
|
||||
}
|
||||
|
||||
void initGraphicsView()
|
||||
{
|
||||
q->setFrameShape(QFrame::NoFrame);
|
||||
@ -210,6 +216,7 @@ void View::setContainment(Plasma::Containment *containment)
|
||||
if (d->containment) {
|
||||
disconnect(d->containment, SIGNAL(destroyed(QObject*)), this, SLOT(containmentDestroyed()));
|
||||
disconnect(d->containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect()));
|
||||
disconnect(d->containment, SIGNAL(screenChanged(int, int, Plasma::Containment *)), this, SLOT(containmentScreenChanged(int, int, Plasma::Containment *)));
|
||||
d->containment->removeAssociatedWidget(this);
|
||||
}
|
||||
|
||||
@ -261,6 +268,7 @@ void View::setContainment(Plasma::Containment *containment)
|
||||
d->updateSceneRect();
|
||||
connect(containment, SIGNAL(destroyed(QObject*)), this, SLOT(containmentDestroyed()));
|
||||
connect(containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect()));
|
||||
connect(containment, SIGNAL(screenChanged(int, int, Plasma::Containment *)), this, SLOT(containmentScreenChanged(int, int, Plasma::Containment *)));
|
||||
}
|
||||
|
||||
Containment *View::containment() const
|
||||
|
Loading…
Reference in New Issue
Block a user