mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Also update the currentZone
This commit is contained in:
parent
a8074ba1f2
commit
488e0a3f54
1 changed files with 6 additions and 2 deletions
|
|
@ -47,8 +47,13 @@ void CardDragItem::updatePosition(const QPointF &cursorScenePos)
|
|||
cursorZone = zoneViewZone;
|
||||
else if (cardZone)
|
||||
cursorZone = cardZone;
|
||||
|
||||
// Always update the current zone, even if its null, to cancel the drag
|
||||
// instead of dropping cards into an non-intuitive location.
|
||||
currentZone = cursorZone;
|
||||
|
||||
if (!cursorZone) {
|
||||
// Temporary fix: avoid the cards getting stuck visually when not over
|
||||
// Avoid the cards getting stuck visually when not over
|
||||
// any zone.
|
||||
QPointF newPos = cursorScenePos - hotSpot;
|
||||
|
||||
|
|
@ -60,7 +65,6 @@ void CardDragItem::updatePosition(const QPointF &cursorScenePos)
|
|||
|
||||
return;
|
||||
}
|
||||
currentZone = cursorZone;
|
||||
|
||||
QPointF zonePos = currentZone->scenePos();
|
||||
QPointF cursorPosInZone = cursorScenePos - zonePos;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue