File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -271,11 +271,16 @@ def load_config_values(self):
271271 with open ("config.yaml" , "rt" , encoding = 'utf8' ) as stream :
272272 self .config , ind , bsi = ruamel .yaml .util .load_yaml_guess_indent (stream )
273273
274+ # Check if theme is valid
275+ if get_theme_data (self .config ['config' ]['THEME' ]) is None :
276+ # Theme from config.yaml is not valid: use first theme available default size 3.5"
277+ self .config ['config' ]['THEME' ] = get_themes (SIZE_3_5_INCH )[0 ]
278+
274279 try :
275280 self .theme_cb .set (self .config ['config' ]['THEME' ])
276281 except :
277- self .theme_cb .current ( 0 )
278- # self.load_theme_size()
282+ self .theme_cb .set ( "" )
283+
279284 self .load_theme_preview ()
280285
281286 try :
@@ -361,7 +366,6 @@ def save_config_values(self):
361366 ruamel .yaml .YAML ().dump (self .config , file )
362367
363368 def on_theme_change (self , e = None ):
364- # self.load_theme_size()
365369 self .load_theme_preview ()
366370
367371 def on_theme_editor_click (self ):
You can’t perform that action at this time.
0 commit comments