From a14eef2b60038a4bb71cb8173a7c2690343063a6 Mon Sep 17 00:00:00 2001 From: Joe R Date: Sun, 12 May 2024 22:32:17 -0400 Subject: [PATCH] Fixed bug where the preview can partially change the main game cardset. --- pysollib/tile/selectgame.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pysollib/tile/selectgame.py b/pysollib/tile/selectgame.py index a43e0b7d..429f9ed6 100644 --- a/pysollib/tile/selectgame.py +++ b/pysollib/tile/selectgame.py @@ -358,6 +358,7 @@ class SelectGameDialogWithPreview(SelectGameDialog): self.gameid = gameid self.bookmark = bookmark self.criteria = SearchCriteria() + self.cardset = self.app.cardset.copy() self.random = None if self.TreeDataHolder_Class.data is None: self.TreeDataHolder_Class.data = self.TreeData_Class(app) @@ -499,6 +500,7 @@ class SelectGameDialogWithPreview(SelectGameDialog): return SelectGameDialog.initKw(self, kw) def destroy(self): + self.app.cardset = self.cardset self.deletePreview(destroy=1) self.preview.unbind_all() SelectGameDialog.destroy(self)