mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
minor hover bug fix
This commit is contained in:
parent
c4cb0f6354
commit
c8779032c8
5 changed files with 15 additions and 13 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue