Sync value too.

Took 3 minutes
This commit is contained in:
Lukas Brübach 2026-05-21 06:44:47 +02:00
parent 46e7455d09
commit 5edcbbf80b

View file

@ -28,7 +28,10 @@ AbstractCounter::AbstractCounter(CounterState *state,
{ {
setAcceptHoverEvents(true); setAcceptHoverEvents(true);
connect(state, &CounterState::valueChanged, this, [this]() { update(); }); connect(state, &CounterState::valueChanged, this, [this](int, int newValue) {
value = newValue;
update();
});
if (player->getPlayerInfo()->getLocalOrJudge()) { if (player->getPlayerInfo()->getLocalOrJudge()) {
menu = new TearOffMenu(TranslateCounterName::getDisplayName(state->getName())); menu = new TearOffMenu(TranslateCounterName::getDisplayName(state->getName()));