mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-28 00:42:19 -07:00
Replace direct emit of PlayerLogic signal with requestRearrangeCounters slot call
This commit is contained in:
parent
7b135fe10c
commit
e881c3f437
2 changed files with 5 additions and 1 deletions
|
|
@ -95,6 +95,10 @@ signals:
|
||||||
public slots:
|
public slots:
|
||||||
void setActive(bool _active);
|
void setActive(bool _active);
|
||||||
void onRequestZoneViewToggle(const QString &zoneName, int numberCards, bool isReversed);
|
void onRequestZoneViewToggle(const QString &zoneName, int numberCards, bool isReversed);
|
||||||
|
void requestRearrangeCounters()
|
||||||
|
{
|
||||||
|
emit rearrangeCounters();
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PlayerLogic(const ServerInfo_User &info, int _id, bool _local, bool _judge, AbstractGame *_parent);
|
PlayerLogic(const ServerInfo_User &info, int _id, bool _local, bool _judge, AbstractGame *_parent);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ AbstractCounter::AbstractCounter(CounterState *state,
|
||||||
|
|
||||||
connect(state, &CounterState::activeChanged, this, [this](bool newActive) {
|
connect(state, &CounterState::activeChanged, this, [this](bool newActive) {
|
||||||
setActive(newActive);
|
setActive(newActive);
|
||||||
emit player->rearrangeCounters();
|
player->requestRearrangeCounters();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (player->getPlayerInfo()->getLocalOrJudge()) {
|
if (player->getPlayerInfo()->getLocalOrJudge()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue