icons moving doesn't trigger a click action

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=760630
This commit is contained in:
Aaron J. Seigo 2008-01-13 05:33:05 +00:00
parent c4399a67cb
commit 6329570f8f
2 changed files with 4 additions and 0 deletions

View File

@ -963,6 +963,7 @@ void Icon::mousePressEvent(QGraphicsSceneMouseEvent *event)
}
d->states |= Private::PressedState;
d->clickStartPos = scenePos();
bool handled = false;
foreach (IconAction *action, d->cornerActions) {
@ -1016,6 +1017,8 @@ void Icon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
}
}
handled = d->clickStartPos != scenePos();
if (!handled) {
if (boundingRect().contains(event->pos())) {
emit clicked();

View File

@ -174,6 +174,7 @@ public:
bool invertLayout;
bool drawBg;
QSizeF currentSize;
QPointF clickStartPos;
QList<IconAction*> cornerActions;