Use replacement text for blank surname heading in person tree

This will use the replacement text defined in the preferences
instead of a blank heading in the person tree view and person
selector.
This commit is contained in:
Matthias Kemmer 2021-06-18 16:13:00 +02:00 committed by Nick Hall
parent b10557d1bd
commit 4f8dab224c

View File

@ -84,6 +84,7 @@ COLUMN_TAGS = 18
COLUMN_PRIV = 19
invalid_date_format = config.get('preferences.invalid-date-format')
no_surname = config.get("preferences.no-surname-text")
#-------------------------------------------------------------------------
#
@ -614,7 +615,7 @@ class PersonTreeModel(PeopleBaseModel, TreeBaseModel):
return [_('Group As'), _('Name')]
def column_header(self, node):
return node.name
return node.name if node.name else no_surname
def add_row(self, handle, data):
"""