Skip to content

Commit

Permalink
Fixed bug with the preview using the wrong cardset after loading one …
Browse files Browse the repository at this point in the history
…with a subtype.
  • Loading branch information
joeraz committed Nov 26, 2023
1 parent b05c922 commit 069c8e8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pysollib/pysolgtk/selectgame.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,10 @@ def updatePreview(self, gameid, animations=10):
c = self.app.cardsets_cache.get(gi.category)
if c:
c2 = c.get(gi.subcategory)
if not c2:
c = self.app.cardsets_cache.get(cardset.type)
if c:
c2 = c.get(cardset.subtype)
if c2:
self.preview_app.images = c2[2]
else:
Expand Down
4 changes: 4 additions & 0 deletions pysollib/tile/selectgame.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,10 @@ def updatePreview(self, gameid, animations=10):
c = self.app.cardsets_cache.get(gi.category)
if c:
c2 = c.get(gi.subcategory)
if not c2:
c = self.app.cardsets_cache.get(cardset.type)
if c:
c2 = c.get(cardset.subtype)
if c2:
self.preview_app.images = c2[2]
else:
Expand Down
4 changes: 4 additions & 0 deletions pysollib/tk/selectgame.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@ def updatePreview(self, gameid, animations=10):
c = self.app.cardsets_cache.get(gi.category)
if c:
c2 = c.get(gi.subcategory)
if not c2:
c = self.app.cardsets_cache.get(cardset.type)
if c:
c2 = c.get(cardset.subtype)
if c2:
self.preview_app.images = c2[2]
else:
Expand Down

0 comments on commit 069c8e8

Please sign in to comment.