9495: Narratedweb : inconsistent & incomplete display of place hierarchy labels

This commit is contained in:
SNoiraud 2016-06-18 19:30:36 +02:00
parent f776dc480e
commit 75f383f90f

View File

@ -3446,8 +3446,14 @@ class PlacePages(BasePage):
[_("Longitude"), "ColumnLongitude"] ] [_("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, 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 first = True
# begin table body # begin table body
@ -3459,11 +3465,10 @@ class PlacePages(BasePage):
place = self.dbase_.get_place_from_handle(place_handle_key) place = self.dbase_.get_place_from_handle(place_handle_key)
if place: if place:
if place.get_change_time() > ldatec: ldatec = place.get_change_time() if place.get_change_time() > ldatec: ldatec = place.get_change_time()
place_title = ReportUtils.place_name(self.dbase_, place_title = _pd.display(self.dbase_, place)
place_handle_key)
ml = get_main_location(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), letter = get_index_letter(first_letter(place_title),
index_list) index_list)
else: else: