1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Moved cardset change fix to cancel button.

This commit is contained in:
Joe R 2024-05-16 17:34:03 -04:00
parent efdb843179
commit 66d2eaba5f

View file

@ -328,6 +328,9 @@ class SelectGameDialog(MfxDialog):
if button == 0: # Ok or double click
self.gameid = self.tree.selection_key
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 button == 10: # Rules
doc = self.app.getGameRulesFilename(self.tree.selection_key)
if not doc:
@ -500,7 +503,6 @@ 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)