mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 11:03:54 -07:00
Ctrl drag now adds/removes to selection (#5336)
* refactor: clean up to use for-each loop * track cards in rect so far and toggle isSelected on change * only clear selection if ctrl isn't held * fix build errors
This commit is contained in:
parent
ca486e5ed9
commit
d5ae4eed26
2 changed files with 22 additions and 6 deletions
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "card_zone.h"
|
||||
|
||||
#include <QSet>
|
||||
|
||||
/**
|
||||
* A CardZone where the cards are laid out, with each card directly interactable by clicking.
|
||||
*/
|
||||
|
|
@ -11,6 +13,7 @@ class SelectZone : public CardZone
|
|||
Q_OBJECT
|
||||
private:
|
||||
QPointF selectionOrigin;
|
||||
QSet<CardItem *> cardsInSelectionRect;
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue