Merge branch 'master' into experimental
This commit is contained in:
commit
42ad959220
2 changed files with 6 additions and 2 deletions
|
@ -22,8 +22,12 @@ void SelectZone::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||||
pos.setY(br.height());
|
pos.setY(br.height());
|
||||||
|
|
||||||
QRectF selectionRect = QRectF(selectionOrigin, pos).normalized();
|
QRectF selectionRect = QRectF(selectionOrigin, pos).normalized();
|
||||||
for (int i = 0; i < cards.size(); ++i)
|
for (int i = 0; i < cards.size(); ++i) {
|
||||||
|
if (cards[i]->getAttachedTo())
|
||||||
|
if (cards[i]->getAttachedTo()->getZone() != this)
|
||||||
|
continue;
|
||||||
cards[i]->setSelected(selectionRect.intersects(cards[i]->mapRectToParent(cards[i]->boundingRect())));
|
cards[i]->setSelected(selectionRect.intersects(cards[i]->mapRectToParent(cards[i]->boundingRect())));
|
||||||
|
}
|
||||||
|
|
||||||
static_cast<GameScene *>(scene())->resizeRubberBand(scenePos() + pos);
|
static_cast<GameScene *>(scene())->resizeRubberBand(scenePos() + pos);
|
||||||
event->accept();
|
event->accept();
|
||||||
|
|
|
@ -761,7 +761,7 @@ ResponseCode Server_ProtocolHandler::cmdAttachCard(Command_AttachCard *cmd, Comm
|
||||||
// Make a copy of the list because its contents change during the loop otherwise.
|
// Make a copy of the list because its contents change during the loop otherwise.
|
||||||
QList<Server_Card *> attachedList = card->getAttachedCards();
|
QList<Server_Card *> attachedList = card->getAttachedCards();
|
||||||
for (int i = 0; i < attachedList.size(); ++i)
|
for (int i = 0; i < attachedList.size(); ++i)
|
||||||
player->unattachCard(cont, attachedList[i]);
|
attachedList[i]->getZone()->getPlayer()->unattachCard(cont, attachedList[i]);
|
||||||
|
|
||||||
if (targetzone->isColumnStacked(targetCard->getX(), targetCard->getY())) {
|
if (targetzone->isColumnStacked(targetCard->getX(), targetCard->getY())) {
|
||||||
CardToMove *cardToMove = new CardToMove(targetCard->getId());
|
CardToMove *cardToMove = new CardToMove(targetCard->getId());
|
||||||
|
|
Loading…
Reference in a new issue