Consider if the setting is set on the game info first.

Took 4 minutes
This commit is contained in:
Lukas Brübach 2025-08-13 18:58:20 +02:00
parent 18fdf94fb2
commit 3e383e2d36

View file

@ -912,6 +912,7 @@ void TabGame::eventGameStateChanged(const Event_GameStateChanged &event,
if (player->getLocal()) { if (player->getLocal()) {
continue; continue;
} }
if (gameInfo.share_decklists_on_load()) {
DeckList loader; DeckList loader;
loader.loadFromString_Native(QString::fromStdString(playerInfo.deck_list())); loader.loadFromString_Native(QString::fromStdString(playerInfo.deck_list()));
QMapIterator<int, TabbedDeckViewContainer *> i(deckViewContainers); QMapIterator<int, TabbedDeckViewContainer *> i(deckViewContainers);
@ -921,6 +922,7 @@ void TabGame::eventGameStateChanged(const Event_GameStateChanged &event,
} }
} }
} }
}
for (int i = 0; i < playerListSize; ++i) { for (int i = 0; i < playerListSize; ++i) {
const ServerInfo_Player &playerInfo = event.player_list(i); const ServerInfo_Player &playerInfo = event.player_list(i);
const ServerInfo_PlayerProperties &prop = playerInfo.properties(); const ServerInfo_PlayerProperties &prop = playerInfo.properties();