From 90ffaeb2d1cc61bd5b95dfa91c5f00b2437c3cf3 Mon Sep 17 00:00:00 2001 From: Joe R Date: Fri, 7 Jun 2024 19:11:23 -0400 Subject: [PATCH] Fixed resetting of cardset on cancelling select game. --- pysollib/tile/selectgame.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pysollib/tile/selectgame.py b/pysollib/tile/selectgame.py index 24a373d5..34bb20c9 100644 --- a/pysollib/tile/selectgame.py +++ b/pysollib/tile/selectgame.py @@ -330,7 +330,10 @@ class SelectGameDialog(MfxDialog): self.tree.n_expansions = 1 # save xyview in any case if button == 1: # Cancel button # If the user cancels, revert any cardset change from the preview. - self.app.cardset = self.cardset + if self.app.cardset.name != self.cardset.name: + self.app.loadCardset(self.cardset, + id=self.game.gameinfo.category, + tocache=True, noprogress=True) if button == 10: # Rules doc = self.app.getGameRulesFilename(self.tree.selection_key) if not doc: