check that target card is in play before attaching

This commit is contained in:
RickyRister 2024-12-19 12:05:55 -08:00
parent 17e6bfaca6
commit e29a9fd253

View file

@ -309,8 +309,8 @@ void ArrowAttachItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
void ArrowAttachItem::attachCards(CardItem *startCard, const CardItem *targetCard) void ArrowAttachItem::attachCards(CardItem *startCard, const CardItem *targetCard)
{ {
// do nothing if target is already attached to another card // do nothing if target is already attached to another card or is not in play
if (targetCard->getAttachedTo()) { if (targetCard->getAttachedTo() || targetCard->getZone()->getName() != "table") {
return; return;
} }