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:
parent
b622b234d0
commit
1b7f06d209
@ -226,6 +226,7 @@ PackageStructure::Ptr Applet::packageStructure()
|
|||||||
|
|
||||||
void Applet::init()
|
void Applet::init()
|
||||||
{
|
{
|
||||||
|
setFlag(ItemIsMovable, true);
|
||||||
if (d->script) {
|
if (d->script) {
|
||||||
d->setupScriptSupport();
|
d->setupScriptSupport();
|
||||||
|
|
||||||
@ -1701,7 +1702,7 @@ bool Applet::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
|
|||||||
|
|
||||||
void Applet::mouseMoveEvent(QGraphicsSceneMouseEvent *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();
|
QGraphicsItem *parent = parentItem();
|
||||||
Plasma::Applet *applet = qgraphicsitem_cast<Plasma::Applet*>(parent);
|
Plasma::Applet *applet = qgraphicsitem_cast<Plasma::Applet*>(parent);
|
||||||
|
|
||||||
|
@ -947,6 +947,7 @@ void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
applet->setFlag(QGraphicsItem::ItemIsMovable, true);
|
||||||
applet->updateConstraints(Plasma::AllConstraints);
|
applet->updateConstraints(Plasma::AllConstraints);
|
||||||
if (!delayInit) {
|
if (!delayInit) {
|
||||||
applet->flushPendingConstraintsEvents();
|
applet->flushPendingConstraintsEvents();
|
||||||
|
Loading…
Reference in New Issue
Block a user