mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-22 03:04:09 -04:00
Moved cardset change fix to cancel button.
This commit is contained in:
parent
efdb843179
commit
66d2eaba5f
1 changed files with 3 additions and 1 deletions
|
@ -328,6 +328,9 @@ class SelectGameDialog(MfxDialog):
|
||||||
if button == 0: # Ok or double click
|
if button == 0: # Ok or double click
|
||||||
self.gameid = self.tree.selection_key
|
self.gameid = self.tree.selection_key
|
||||||
self.tree.n_expansions = 1 # save xyview in any case
|
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
|
if button == 10: # Rules
|
||||||
doc = self.app.getGameRulesFilename(self.tree.selection_key)
|
doc = self.app.getGameRulesFilename(self.tree.selection_key)
|
||||||
if not doc:
|
if not doc:
|
||||||
|
@ -500,7 +503,6 @@ class SelectGameDialogWithPreview(SelectGameDialog):
|
||||||
return SelectGameDialog.initKw(self, kw)
|
return SelectGameDialog.initKw(self, kw)
|
||||||
|
|
||||||
def destroy(self):
|
def destroy(self):
|
||||||
self.app.cardset = self.cardset
|
|
||||||
self.deletePreview(destroy=1)
|
self.deletePreview(destroy=1)
|
||||||
self.preview.unbind_all()
|
self.preview.unbind_all()
|
||||||
SelectGameDialog.destroy(self)
|
SelectGameDialog.destroy(self)
|
||||||
|
|
Loading…
Add table
Reference in a new issue