diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 4731f75cc..11e0c346e 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -6424,7 +6424,14 @@ class NavWebOptions(MenuReportOptions): # We must figure out the value of the first option before we can # create the EnumeratedListOption fmt_list = _nd.get_name_format() - name_format = EnumeratedListOption(_("Name format"), fmt_list[0][0]) + defaultnum = _nd.get_default_format() + default = 0 + for ind,val in enumerate(fmt_list): + if val[0] == defaultnum: + default = ind + break + name_format = EnumeratedListOption(_("Name format"), + fmt_list[default][0]) for num, name, fmt_str, act in fmt_list: name_format.add_item(num, name) name_format.set_help(_("Select the format to display names")) diff --git a/src/plugins/webreport/WebCal.py b/src/plugins/webreport/WebCal.py index 72d0d68ef..8e30022a1 100644 --- a/src/plugins/webreport/WebCal.py +++ b/src/plugins/webreport/WebCal.py @@ -32,7 +32,6 @@ Web Calendar generator. #------------------------------------------------------------------------ # python modules #------------------------------------------------------------------------ -from __future__ import print_function from functools import partial import os, codecs, shutil, re import datetime, calendar @@ -1083,7 +1082,7 @@ class WebCalReport(Report): else: name = gen.lib.Name(primary_name) surname_obj = name.get_primary_surname() - surname_obj.set_surname(maiden_name) + surname_obj.set_surname(maiden_name) else: name = gen.lib.Name(primary_name) name.set_display_as(self.name_format) @@ -1375,7 +1374,14 @@ class WebCalOptions(MenuReportOptions): # We must figure out the value of the first option before we can # create the EnumeratedListOption fmt_list = _nd.get_name_format() - name_format = EnumeratedListOption(_("Name format"), fmt_list[0][0]) + defaultnum = _nd.get_default_format() + default = 0 + for ind,val in enumerate(fmt_list): + if val[0] == defaultnum: + default = ind + break + name_format = EnumeratedListOption(_("Name format"), + fmt_list[default][0]) for num, name, fmt_str, act in fmt_list: name_format.add_item(num, name) name_format.set_help(_("Select the format to display names"))