SVN_SILENT: don't pass click also on action icons when the mouse was moved

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=761954
This commit is contained in:
Marco Martin 2008-01-15 18:56:23 +00:00
parent 67844a4190
commit 9cc8eabf9b

View File

@ -1009,16 +1009,15 @@ void Icon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
d->states &= ~Private::PressedState;
bool handled = false;
foreach (IconAction *action, d->cornerActions) {
if (action->event(event->type(), event->pos())) {
handled = true;
break;
}
}
//don't pass click when the mouse was moved
bool handled = d->clickStartPos != scenePos();
if (!handled) {
handled = d->clickStartPos != scenePos();
foreach (IconAction *action, d->cornerActions) {
if (action->event(event->type(), event->pos())) {
handled = true;
break;
}
}
}
if (!handled) {