selectzone fix
This commit is contained in:
parent
6c5dd0b3d1
commit
45c65c59dc
1 changed files with 5 additions and 1 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();
|
||||||
|
|
Loading…
Reference in a new issue