Fix Preferences/Genealogical Symbols when only one font is present (#930)

that passes

If user has only a single font available that passes check for the Genealogical Symbols being all present, the original code crashed. Apparently never tested... #598 

Fixes #11395
This commit is contained in:
Paul Culley 2019-10-23 18:07:52 -05:00 committed by Sam Manzi
parent 2fbf945309
commit 16c8e61944

View File

@ -2093,9 +2093,9 @@ class GrampsPreferences(ConfigureDialog):
self.all_avail_fonts, callback=self.utf8_update_font, self.all_avail_fonts, callback=self.utf8_update_font,
valueactive=True, setactive=active_val) valueactive=True, setactive=active_val)
if len(available_fonts) == 1: if len(available_fonts) == 1:
single_font = self.all_avail_fonts[choosefont.get_active()][1] single_font = self.all_avail_fonts[choosefont.get_active()][0]
config.set('utf8.selected-font', config.set('utf8.selected-font',
self.all_avail_fonts[single_font]) self.all_avail_fonts[single_font][1])
self.utf8_show_example() self.utf8_show_example()
symbols = Symbols() symbols = Symbols()
all_sbls = symbols.get_death_symbols() all_sbls = symbols.get_death_symbols()