Skip to content

Commit

Permalink
Fix mismatched log frames
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed Oct 18, 2024
1 parent 56489cb commit 3778ab2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pysollib/tile/tkstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def __init__(self, parent, title, app, player, gameid, **kw):

kw = self.initKw(kw)
title = _('Statistics')
if player is None:
title = _('Demo Statistics')
MfxDialog.__init__(self, parent, title, kw.resizable, kw.default)

self.font = app.getFont('default')
Expand Down Expand Up @@ -546,9 +548,9 @@ def tabChanged(self, *args):
run_button = self.buttons[0]
indx = self.notebook_tabs.index(w)
if indx == 0:
g = self.full_log_frame.getSelectedGame()
else:
g = self.session_log_frame.getSelectedGame()
else:
g = self.full_log_frame.getSelectedGame()
if g[0] is None:
run_button.config(state='disabled')
else:
Expand All @@ -572,10 +574,10 @@ def mDone(self, button):
LogDialog.SELECTED_TAB = indx
if indx == 0:
self.selected_game, self.selected_game_num \
= self.full_log_frame.getSelectedGame()
= self.session_log_frame.getSelectedGame()
else:
self.selected_game, self.selected_game_num \
= self.session_log_frame.getSelectedGame()
= self.full_log_frame.getSelectedGame()

MfxDialog.mDone(self, button)

Expand Down

0 comments on commit 3778ab2

Please sign in to comment.