use QGraphicsScene::sendEvent instead of simply calling the event handler. this allow the containments to have more
control on the moving of the applets installing event filters on them and fixes the moving of the applet Icon in some containments svn path=/trunk/KDE/kdelibs/; revision=1202445
This commit is contained in:
parent
5d9766f6c1
commit
ccb599572e
@ -1738,13 +1738,15 @@ bool Applet::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
|
||||
{
|
||||
switch (event->type()) {
|
||||
case QEvent::GraphicsSceneMouseMove:
|
||||
case QEvent::GraphicsSceneMousePress:
|
||||
case QEvent::GraphicsSceneMouseRelease:
|
||||
{
|
||||
// don't move when the containment is not mutable,
|
||||
// in the rare case the containment doesn't exists consider it as mutable
|
||||
if ((flags() & ItemIsMovable) && d->registeredAsDragHandle.contains(watched)) {
|
||||
Containment *c = containment();
|
||||
if (!c || c->immutability() == Mutable) {
|
||||
mouseMoveEvent(static_cast<QGraphicsSceneMouseEvent*>(event));
|
||||
scene()->sendEvent(this, event);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user