Skip to content

Commit

Permalink
Moved cardset change fix to cancel button.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed May 16, 2024
1 parent efdb843 commit 66d2eab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pysollib/tile/selectgame.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ def mDone(self, button):
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:
Expand Down Expand Up @@ -500,7 +503,6 @@ def initKw(self, kw):
return SelectGameDialog.initKw(self, kw)

def destroy(self):
self.app.cardset = self.cardset
self.deletePreview(destroy=1)
self.preview.unbind_all()
SelectGameDialog.destroy(self)
Expand Down

0 comments on commit 66d2eab

Please sign in to comment.