mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
more cleanup
This commit is contained in:
parent
5aa1cfea21
commit
57ef80d82d
1 changed files with 24 additions and 21 deletions
|
|
@ -111,16 +111,20 @@ void ZoneViewZone::zoneDumpReceived(const Response &r)
|
||||||
|
|
||||||
void ZoneViewZone::updateCardIds(CardAction action)
|
void ZoneViewZone::updateCardIds(CardAction action)
|
||||||
{
|
{
|
||||||
int cardCount = cards.size();
|
if (origZone->contentsKnown()) {
|
||||||
if (!origZone->contentsKnown()) {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (cards.isEmpty()) {
|
if (cards.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int cardCount = cards.size();
|
||||||
|
|
||||||
auto startId = 0;
|
auto startId = 0;
|
||||||
|
|
||||||
if (isReversed) {
|
if (isReversed) {
|
||||||
// these get called after this zone's card list updates but before parent zone's card list updates
|
// the card has not been added to origZone's cardList at this point
|
||||||
startId = origZone->getCards().size() - cardCount;
|
startId = origZone->getCards().size() - cardCount;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case INITIALIZE:
|
case INITIALIZE:
|
||||||
|
|
@ -138,7 +142,6 @@ void ZoneViewZone::updateCardIds(CardAction action)
|
||||||
cards[i]->setId(i + startId);
|
cards[i]->setId(i + startId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Because of boundingRect(), this function must not be called before the zone was added to a scene.
|
// Because of boundingRect(), this function must not be called before the zone was added to a scene.
|
||||||
void ZoneViewZone::reorganizeCards()
|
void ZoneViewZone::reorganizeCards()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue