minor hover bug fix

This commit is contained in:
Max-Wilhelm Bruker 2010-11-10 02:04:40 +01:00
parent c4cb0f6354
commit c8779032c8
5 changed files with 15 additions and 13 deletions

View file

@ -149,7 +149,7 @@ bool GameScene::event(QEvent *event)
for (int i = 0; i < oldItemList.size(); ++i) {
CardItem *card = qgraphicsitem_cast<CardItem *>(oldItemList[i]);
if (card)
card->setZValue(card->getRealZValue());
card->setHovered(false);
}
QList<QGraphicsItem *> itemList = items(mouseEvent->scenePos());
@ -176,7 +176,7 @@ bool GameScene::event(QEvent *event)
}
}
for (int i = 0; i < cardList.size(); ++i)
cardList[i]->setZValue(cardList[i] == maxZCard ? 2000000004 : cardList[i]->getRealZValue());
cardList[i]->setHovered(cardList[i] == maxZCard);
}
}
return QGraphicsScene::event(event);