ignore own events

only steal events of objects that are explicitely filtered
fixes the handle when is under the shadow
This commit is contained in:
Marco Martin 2012-11-22 18:56:58 +01:00
parent f297f1fee6
commit 8b313a1b79

View File

@ -1827,6 +1827,10 @@ bool Applet::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
case QEvent::GraphicsSceneMousePress: case QEvent::GraphicsSceneMousePress:
case QEvent::GraphicsSceneMouseRelease: case QEvent::GraphicsSceneMouseRelease:
{ {
if (watched == this) {
event->setAccepted(false);
return false;
}
// don't move when the containment is not mutable, // don't move when the containment is not mutable,
// in the rare case the containment doesn't exists consider it as mutable // in the rare case the containment doesn't exists consider it as mutable
if ((flags() & ItemIsMovable) && d->registeredAsDragHandle.contains(watched)) { if ((flags() & ItemIsMovable) && d->registeredAsDragHandle.contains(watched)) {