mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-28 01:23:55 -07:00
check that target card is in play before attaching (#5275)
This commit is contained in:
parent
d196988cab
commit
3514699f5b
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue