event->button() is usually empty, do drags only with the left buttons (and find the down position with that too) instead
BUG:198814 svn path=/trunk/KDE/kdelibs/; revision=1137301
This commit is contained in:
parent
c77396e412
commit
6f8d808068
@ -590,8 +590,9 @@ void ExtenderItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
|
||||
void ExtenderItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
QPoint mousePressPos = event->buttonDownPos(event->button()).toPoint();
|
||||
if ((event->pos().toPoint() - mousePressPos).manhattanLength()
|
||||
QPoint mousePressPos = event->buttonDownPos(Qt::LeftButton).toPoint();
|
||||
if (!(event->buttons() & Qt::LeftButton) ||
|
||||
(event->pos().toPoint() - mousePressPos).manhattanLength()
|
||||
< QApplication::startDragDistance()) {
|
||||
return;
|
||||
}
|
||||
@ -664,6 +665,7 @@ void ExtenderItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
drag->setPixmap(pixmap);
|
||||
drag->setMimeData(mimeData);
|
||||
drag->setHotSpot(mousePressPos);
|
||||
|
||||
Qt::DropAction action = drag->exec();
|
||||
|
||||
corona->removeOffscreenWidget(this);
|
||||
|
Loading…
Reference in New Issue
Block a user