mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
improved last commit
This commit is contained in:
parent
44c64322d3
commit
a3f6adddc9
3 changed files with 4 additions and 10 deletions
|
|
@ -189,12 +189,13 @@ void CardItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
|
|||
if (!zone->getPlayer()->getLocal())
|
||||
return;
|
||||
|
||||
if (zone->getName() == "hand") {
|
||||
if (zone->getName() == "table")
|
||||
((TableZone *) zone)->toggleTapped();
|
||||
else {
|
||||
TableZone *table = (TableZone *) zone->getPlayer()->getZones()->findZone("table");
|
||||
QPoint gridPoint = table->getFreeGridPoint(info->getTableRow());
|
||||
table->handleDropEvent(id, zone, table->mapFromGrid(gridPoint).toPoint(), false);
|
||||
} else if (zone->getName() == "table")
|
||||
((TableZone *) zone)->toggleTapped();
|
||||
}
|
||||
}
|
||||
|
||||
void CardItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
|
|
@ -203,11 +204,6 @@ void CardItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
|||
QGraphicsItem::hoverEnterEvent(event);
|
||||
}
|
||||
|
||||
void CardItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
QGraphicsItem::hoverLeaveEvent(event);
|
||||
}
|
||||
|
||||
QVariant CardItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
if (change == ItemSelectedChange) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue