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;
|
containment = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void containmentScreenChanged(int wasScreen, int newScreen, Plasma::Containment *containment)
|
||||||
|
{
|
||||||
|
lastScreen = newScreen;
|
||||||
|
lastDesktop = this->containment->desktop();
|
||||||
|
}
|
||||||
|
|
||||||
void initGraphicsView()
|
void initGraphicsView()
|
||||||
{
|
{
|
||||||
q->setFrameShape(QFrame::NoFrame);
|
q->setFrameShape(QFrame::NoFrame);
|
||||||
@ -210,6 +216,7 @@ void View::setContainment(Plasma::Containment *containment)
|
|||||||
if (d->containment) {
|
if (d->containment) {
|
||||||
disconnect(d->containment, SIGNAL(destroyed(QObject*)), this, SLOT(containmentDestroyed()));
|
disconnect(d->containment, SIGNAL(destroyed(QObject*)), this, SLOT(containmentDestroyed()));
|
||||||
disconnect(d->containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect()));
|
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);
|
d->containment->removeAssociatedWidget(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,6 +268,7 @@ void View::setContainment(Plasma::Containment *containment)
|
|||||||
d->updateSceneRect();
|
d->updateSceneRect();
|
||||||
connect(containment, SIGNAL(destroyed(QObject*)), this, SLOT(containmentDestroyed()));
|
connect(containment, SIGNAL(destroyed(QObject*)), this, SLOT(containmentDestroyed()));
|
||||||
connect(containment, SIGNAL(geometryChanged()), this, SLOT(updateSceneRect()));
|
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
|
Containment *View::containment() const
|
||||||
|
1
view.h
1
view.h
@ -197,6 +197,7 @@ private:
|
|||||||
|
|
||||||
Q_PRIVATE_SLOT(d, void updateSceneRect())
|
Q_PRIVATE_SLOT(d, void updateSceneRect())
|
||||||
Q_PRIVATE_SLOT(d, void containmentDestroyed())
|
Q_PRIVATE_SLOT(d, void containmentDestroyed())
|
||||||
|
Q_PRIVATE_SLOT(d, void containmentScreenChanged(int, int, Plasma::Containment *))
|
||||||
Q_PRIVATE_SLOT(d, void privateInit())
|
Q_PRIVATE_SLOT(d, void privateInit())
|
||||||
|
|
||||||
friend class ViewPrivate;
|
friend class ViewPrivate;
|
||||||
|
Loading…
Reference in New Issue
Block a user