From 1b7f06d209da4f73802c515ff86bdc59d0d91940 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 30 Apr 2010 01:05:52 +0000 Subject: [PATCH] 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 --- applet.cpp | 3 ++- containment.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/applet.cpp b/applet.cpp index ff12dd868..5ce2ee55b 100644 --- a/applet.cpp +++ b/applet.cpp @@ -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(parent); diff --git a/containment.cpp b/containment.cpp index 00841e34b..fc553557d 100644 --- a/containment.cpp +++ b/containment.cpp @@ -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();