mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
unborked
This commit is contained in:
parent
70b37804db
commit
ec234e0499
1 changed files with 5 additions and 4 deletions
|
|
@ -331,12 +331,13 @@ void ZoneViewZone::handleDropEvent(const QList<CardDragItem *> &dragItems,
|
||||||
player->sendGameCommand(cmd);
|
player->sendGameCommand(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneViewZone::removeCard(const int position)
|
void ZoneViewZone::removeCard(int position)
|
||||||
{
|
{
|
||||||
if (isReversed) {
|
if (isReversed) {
|
||||||
int bottomPos = position - cards.first()->getId();
|
int initialPos = position;
|
||||||
if (bottomPos < 0 || bottomPos >= cards.size()) {
|
position -= cards.first()->getId();
|
||||||
updateCardIds(REMOVE_CARD, bottomPos);
|
if (position < 0 || position >= cards.size()) {
|
||||||
|
updateCardIds(REMOVE_CARD, initialPos);
|
||||||
reorganizeCards();
|
reorganizeCards();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue