AlwaysRevealTopCard done, issue #31 fixed

This commit is contained in:
Max-Wilhelm Bruker 2012-04-01 11:45:01 +02:00
parent 840b577f42
commit c835a827b0
6 changed files with 20 additions and 5 deletions

View file

@ -39,11 +39,15 @@ void PileZone::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*optio
void PileZone::addCardImpl(CardItem *card, int x, int /*y*/)
{
connect(card, SIGNAL(sigPixmapUpdated()), this, SLOT(callUpdate()));
cards.insert(x, card);
card->setPos(0, 0);
if (!contentsKnown()) {
card->setName(QString());
card->setId(-1);
// If we obscure a previously revealed card, its name has to be forgotten
if (cards.size() > x + 1)
cards.at(x + 1)->setName(QString());
}
card->setVisible(false);
card->resetState();