summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui/tabs.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-06-27 16:51:54 +0200
committeremkael <emkael@tlen.pl>2019-06-27 16:52:11 +0200
commit48d3f1d9c77d0b365a1a2b39751d114164791992 (patch)
tree43f733a51fed25f37afa4eb17905ff2934442c27 /jfr_playoff/gui/tabs.py
parentd3f1b7c3dca8c62fa445c05e70335cbe4419b41f (diff)
Setting team settings for teams tab
Diffstat (limited to 'jfr_playoff/gui/tabs.py')
-rw-r--r--jfr_playoff/gui/tabs.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/jfr_playoff/gui/tabs.py b/jfr_playoff/gui/tabs.py
index d5eab9b..5b9efc9 100644
--- a/jfr_playoff/gui/tabs.py
+++ b/jfr_playoff/gui/tabs.py
@@ -196,10 +196,19 @@ class TeamsTab(PlayoffTab):
'team_aliases': self.aliasFrame.getConfig()
}
tieConfig = self.previewFrame.getTieConfig()
- if tieConfig is not None and isinstance(config['teams'], dict):
+ if tieConfig is not None:
config['teams']['ties'] = tieConfig
return config
+ def setValues(self, config):
+ self.settingsFrame.setValues(
+ config['teams'] if 'teams' in config else [])
+ self.aliasFrame.setValues(
+ config['team_aliases'] if 'team_aliases' in config else {})
+ self.previewFrame.setTieConfig(
+ config['teams']['ties']
+ if 'teams' in config and 'ties' in config['teams'] else [])
+
class MatchesTab(PlayoffTab):
@property
def title(self):