explicitly set the applet as movable; this is because the containment isn't and this gets propagated when setting the containment as the parent.

svn path=/trunk/KDE/kdelibs/; revision=1120801
This commit is contained in:
Aaron J. Seigo 2010-04-30 01:05:52 +00:00
parent b622b234d0
commit 1b7f06d209
2 changed files with 3 additions and 1 deletions

View File

@ -226,6 +226,7 @@ PackageStructure::Ptr Applet::packageStructure()
void Applet::init()
{
setFlag(ItemIsMovable, true);
if (d->script) {
d->setupScriptSupport();
@ -1701,7 +1702,7 @@ bool Applet::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
void Applet::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
if (immutability() == Mutable && formFactor() == Plasma::Planar && flags() & ItemIsMovable) {
if (immutability() == Mutable && formFactor() == Plasma::Planar && (flags() & ItemIsMovable)) {
QGraphicsItem *parent = parentItem();
Plasma::Applet *applet = qgraphicsitem_cast<Plasma::Applet*>(parent);

View File

@ -947,6 +947,7 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
}
}
applet->setFlag(QGraphicsItem::ItemIsMovable, true);
applet->updateConstraints(Plasma::AllConstraints);
if (!delayInit) {
applet->flushPendingConstraintsEvents();