Commit 45c65c59 authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

selectzone fix

parent 6c5dd0b3
...@@ -22,8 +22,12 @@ void SelectZone::mouseMoveEvent(QGraphicsSceneMouseEvent *event) ...@@ -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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment