[Game] Restore attach bookkeeping via CardItem and repaint on state change

This commit is contained in:
Lukas Brübach 2026-10-11 14:57:43 +02:00 • committed by GitHub
parent f321132cce
commit 50a5884606
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 3 deletions

View file

@ -71,6 +71,10 @@ CardItem::CardItem(PlayerLogic *_owner,
update();
});
// The retyped logic layer drives CardState setters directly (bypassing the CardItem wrappers that called
// update()), so repaint on every state change: attacking, annotation, doesntUntap, P/T and counters.
connect(state, &CardState::stateChanged, this, [this] { update(); });
connect(state, &CardState::viewDeleteRequested, this, &CardItem::deleteLater);
}