make the applet appear in the direction nearest to the mouse instead of

the entry position, more hanle-follows-mind

svn path=/trunk/KDE/kdelibs/; revision=928669
This commit is contained in:
Marco Martin 2009-02-19 19:43:52 +00:00
parent 0a60f4c5d2
commit d2446a59fc

View File

@ -1166,6 +1166,17 @@ bool Containment::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
}
}
break;
case QEvent::GraphicsSceneHoverMove:
if (immutability() == Mutable && applet->immutability() == Mutable) {
QGraphicsSceneHoverEvent *he = static_cast<QGraphicsSceneHoverEvent*>(event);
if (d->handles.contains(applet)) {
AppletHandle *handle = d->handles.value(applet);
if (handle) {
handle->setHoverPos(he->pos());
}
}
}
break;
default:
break;
}