From 9bf2202739d94028337f3744b122f0e3242b3886 Mon Sep 17 00:00:00 2001 From: RickyRister <42636155+RickyRister@users.noreply.github.com> Date: Mon, 31 Aug 2026 07:31:02 -0700 Subject: [PATCH] [Game] Fix dragged card always placed on bottom of stack (#7228) --- cockatrice/src/game_graphics/zones/stack_zone.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cockatrice/src/game_graphics/zones/stack_zone.cpp b/cockatrice/src/game_graphics/zones/stack_zone.cpp index e9b14f13d..e15051885 100644 --- a/cockatrice/src/game_graphics/zones/stack_zone.cpp +++ b/cockatrice/src/game_graphics/zones/stack_zone.cpp @@ -58,17 +58,12 @@ void StackZone::handleDropEvent(const QList &dragItems, } const auto &cards = getLogic()->getCards(); - int index; + int index = calcDropIndexFromY(dropPoint.y(), MIN_CARD_VISIBLE); if (startZone == getLogic()) { - // Reordering within the zone: use drop position - index = calcDropIndexFromY(dropPoint.y(), MIN_CARD_VISIBLE); // Same-zone no-op: don't move a card onto itself if (!cards.isEmpty() && cards.at(index)->getId() == dragItems.at(0)->getId()) { return; } - } else { - // Coming from another zone: append at end (top of stack, rendered on top) - index = static_cast(cards.size()); } Command_MoveCard cmd;