mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 16:32:16 -07:00
it works!!!!!!!!
This commit is contained in:
parent
3e07d06825
commit
027dbbeb7e
1 changed files with 3 additions and 3 deletions
|
|
@ -132,9 +132,6 @@ void ZoneViewZone::updateCardIds(CardAction action, int index)
|
||||||
case INITIALIZE:
|
case INITIALIZE:
|
||||||
break;
|
break;
|
||||||
case ADD_CARD:
|
case ADD_CARD:
|
||||||
if (index < cards.first()->getId()) {
|
|
||||||
startId += 1;
|
|
||||||
}
|
|
||||||
startId += 1;
|
startId += 1;
|
||||||
break;
|
break;
|
||||||
case REMOVE_CARD:
|
case REMOVE_CARD:
|
||||||
|
|
@ -293,11 +290,14 @@ void ZoneViewZone::addCardImpl(CardItem *card, int x, int /*y*/)
|
||||||
if (x != 0) {
|
if (x != 0) {
|
||||||
cards.append(card);
|
cards.append(card);
|
||||||
} else {
|
} else {
|
||||||
|
updateCardIds(ADD_CARD, x);
|
||||||
|
reorganizeCards();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cards.insert(x, card);
|
cards.insert(x, card);
|
||||||
}
|
}
|
||||||
|
|
||||||
card->setParentItem(this);
|
card->setParentItem(this);
|
||||||
card->update();
|
card->update();
|
||||||
updateCardIds(ADD_CARD, x);
|
updateCardIds(ADD_CARD, x);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue