From 3e383e2d3602aa6de58f2605ffa437253760dcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Wed, 13 Aug 2025 18:58:20 +0200 Subject: [PATCH] Consider if the setting is set on the game info first. Took 4 minutes --- cockatrice/src/client/tabs/tab_game.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cockatrice/src/client/tabs/tab_game.cpp b/cockatrice/src/client/tabs/tab_game.cpp index e55375708..df8106078 100644 --- a/cockatrice/src/client/tabs/tab_game.cpp +++ b/cockatrice/src/client/tabs/tab_game.cpp @@ -912,12 +912,14 @@ void TabGame::eventGameStateChanged(const Event_GameStateChanged &event, if (player->getLocal()) { continue; } - DeckList loader; - loader.loadFromString_Native(QString::fromStdString(playerInfo.deck_list())); - QMapIterator i(deckViewContainers); - while (i.hasNext()) { - i.next(); - i.value()->addOpponentDeckView(loader, playerId, player->getName()); + if (gameInfo.share_decklists_on_load()) { + DeckList loader; + loader.loadFromString_Native(QString::fromStdString(playerInfo.deck_list())); + QMapIterator i(deckViewContainers); + while (i.hasNext()) { + i.next(); + i.value()->addOpponentDeckView(loader, playerId, player->getName()); + } } } }