diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index 2d4754866..33857cc1b 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -3446,8 +3446,14 @@ class PlacePages(BasePage): [_("Longitude"), "ColumnLongitude"] ] ) + # bug 9495 : incomplete display of place hierarchy labels + def sort_by_place_name(obj): + place = self.dbase_.get_place_from_handle(obj) + name = _pd.display(self.dbase_, place) + return (name) + handle_list = sorted(place_handles, - key=lambda x: SORT_KEY(ReportUtils.place_name(self.dbase_, x))) + key=lambda x: sort_by_place_name(x)) first = True # begin table body @@ -3459,11 +3465,10 @@ class PlacePages(BasePage): place = self.dbase_.get_place_from_handle(place_handle_key) if place: if place.get_change_time() > ldatec: ldatec = place.get_change_time() - place_title = ReportUtils.place_name(self.dbase_, - place_handle_key) + place_title = _pd.display(self.dbase_, place) ml = get_main_location(self.dbase_, place) - if place_title and not place_title.isspace(): + if place_title and place_title != " ": letter = get_index_letter(first_letter(place_title), index_list) else: