[Player] Stop reaching into graphics_item and emit signals instead for conceded and zoneId (#6912)

* [Player] Stop reaching into graphics_item and emit signals instead for conceded and zoneId

Took 7 minutes

Took 3 seconds

* Add sameValue check.

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-05-19 12:22:40 +02:00 committed by GitHub
parent af2f888293
commit 9f1c225b7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 3 deletions

View file

@ -15,6 +15,8 @@ PlayerGraphicsItem::PlayerGraphicsItem(Player *_player) : player(_player)
connect(&SettingsCache::instance(), &SettingsCache::handJustificationChanged, this,
&PlayerGraphicsItem::rearrangeZones);
connect(player, &Player::rearrangeCounters, this, &PlayerGraphicsItem::rearrangeCounters);
connect(player, &Player::concededChanged, this, [this](int, bool c) { setVisible(!c); });
connect(player, &Player::zoneIdChanged, this, [this](int id) { playerArea->setPlayerZoneId(id); });
playerArea = new PlayerArea(this);