diff --git a/gramps/gen/plug/report/stdoptions.py b/gramps/gen/plug/report/stdoptions.py index 9e6f4155e..bc84d0ce3 100644 --- a/gramps/gen/plug/report/stdoptions.py +++ b/gramps/gen/plug/report/stdoptions.py @@ -340,3 +340,4 @@ def add_place_format_option(menu, category): place_format.add_item(number, fmt.name) place_format.set_help(_("Select the format to display places")) menu.add_option(category, "place_format", place_format) + return place_format diff --git a/gramps/plugins/textreport/placereport.py b/gramps/plugins/textreport/placereport.py index 8bf1e9ef9..f2139d142 100644 --- a/gramps/plugins/textreport/placereport.py +++ b/gramps/plugins/textreport/placereport.py @@ -413,6 +413,7 @@ class PlaceOptions(MenuReportOptions): self.__db = dbase self.__filter = None self.__places = None + self.__pf = None MenuReportOptions.__init__(self, name, dbase) def get_subject(self): @@ -428,7 +429,7 @@ class PlaceOptions(MenuReportOptions): subject += " + " place = self.__db.get_place_from_gramps_id(place_id) subject += _pd.display(self.__db, place, None, - self.place_format) + self.__pf.get_value()) return subject def add_menu_options(self, menu): @@ -462,7 +463,7 @@ class PlaceOptions(MenuReportOptions): stdoptions.add_name_format_option(menu, category_name) - stdoptions.add_place_format_option(menu, category_name) + self.__pf = stdoptions.add_place_format_option(menu, category_name) stdoptions.add_private_data_option(menu, category_name)