backport revision 931126
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=/branches/KDE/4.2/kdelibs/; revision=931127
This commit is contained in:
parent
59896b6e95
commit
334a27933d
8
view.cpp
8
view.cpp
@ -86,6 +86,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);
|
||||||
@ -196,6 +202,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,6 +254,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 *))
|
||||||
|
|
||||||
friend class ViewPrivate;
|
friend class ViewPrivate;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user