mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
some fixes
This commit is contained in:
parent
ca07cce5ed
commit
00a2f49c94
9 changed files with 128 additions and 67 deletions
|
|
@ -53,8 +53,7 @@ void CardDragItem::updatePosition(const QPointF &cursorScenePos)
|
|||
QPointF zonePos = currentZone->scenePos();
|
||||
QPointF cursorPosInZone = cursorScenePos - zonePos;
|
||||
QPointF cardTopLeft = cursorPosInZone - hotSpot;
|
||||
// QPointF cardCenter = cardTopLeft + QPointF(CARD_WIDTH / 2, CARD_HEIGHT / 2);
|
||||
QPointF newPos = zonePos + cursorZone->closestGridPoint(cardTopLeft + QPoint(CARD_WIDTH / 2, CARD_HEIGHT / 2));
|
||||
QPointF newPos = zonePos + cursorZone->closestGridPoint(cardTopLeft);
|
||||
|
||||
// qDebug(QString("cardTopLeft = %1, %2 cardCenter = %3, %4").arg((cardTopLeft).x()).arg((cardTopLeft).y()).arg(cardCenter.x()).arg(cardCenter.y()).toLatin1());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue