rename canResize param to toNewZone

This commit is contained in:
RickyRister 2025-01-21 23:29:39 -08:00
parent 085f0dd26c
commit 1a33c791d9
3 changed files with 5 additions and 5 deletions

View file

@ -173,7 +173,7 @@ CardItem *CardZone::getCard(int cardId, const QString &cardName)
return c; return c;
} }
CardItem *CardZone::takeCard(int position, int cardId, bool /*canResize*/) CardItem *CardZone::takeCard(int position, int cardId, bool toNewZone)
{ {
if (position == -1) { if (position == -1) {
// position == -1 means either that the zone is indexed by card id // position == -1 means either that the zone is indexed by card id

View file

@ -244,10 +244,10 @@ void TableZone::toggleTapped()
player->sendGameCommand(player->prepareGameCommand(cmdList)); player->sendGameCommand(player->prepareGameCommand(cmdList));
} }
CardItem *TableZone::takeCard(int position, int cardId, bool canResize) CardItem *TableZone::takeCard(int position, int cardId, bool toNewZone)
{ {
CardItem *result = CardZone::takeCard(position, cardId); CardItem *result = CardZone::takeCard(position, cardId);
if (canResize) if (toNewZone)
resizeToContents(); resizeToContents();
return result; return result;
} }

View file

@ -147,10 +147,10 @@ public:
@param position card position @param position card position
@param cardId id of card to take @param cardId id of card to take
@param canResize defaults to true @param toNewZone Whether the destination of the card is not the same as the starting zone. Defaults to true
@return CardItem that has been removed @return CardItem that has been removed
*/ */
CardItem *takeCard(int position, int cardId, bool canResize = true) override; CardItem *takeCard(int position, int cardId, bool toNewZone = true) override;
/** /**
Resizes the TableZone in case CardItems are within or Resizes the TableZone in case CardItems are within or