Tag browser: Fix grouping by name for authors

This commit is contained in:
Kovid Goyal 2011-01-02 11:00:18 -07:00
parent ccd7d1c253
commit 9f7bdcdc0b
2 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ categories_use_field_for_author_name = 'author'
# sort: the sort value. For authors, this is the author_sort for that author # sort: the sort value. For authors, this is the author_sort for that author
# category: the category (e.g., authors, series) that the item is in. # category: the category (e.g., authors, series) that the item is in.
categories_collapse_more_than = 50 categories_collapse_more_than = 50
categories_collapsed_name_template = '{first.name:shorten(4,'',0)} - {last.name::shorten(4,'',0)}' categories_collapsed_name_template = '{first.sort:shorten(4,'',0)} - {last.sort:shorten(4,'',0)}'
categories_collapsed_rating_template = '{first.avg_rating:4.2f:ifempty(0)} - {last.avg_rating:4.2f:ifempty(0)}' categories_collapsed_rating_template = '{first.avg_rating:4.2f:ifempty(0)} - {last.avg_rating:4.2f:ifempty(0)}'
categories_collapsed_popularity_template = '{first.count:d} - {last.count:d}' categories_collapsed_popularity_template = '{first.count:d} - {last.count:d}'
categories_collapse_model = 'first letter' categories_collapse_model = 'first letter'

View File

@ -738,7 +738,7 @@ class TagsModel(QAbstractItemModel): # {{{
category_key=category_node.category_key) category_key=category_node.category_key)
else: else:
if upper(tag.sort[0]) != collapse_letter: if upper(tag.sort[0]) != collapse_letter:
collapse_letter = upper(tag.name[0]) collapse_letter = upper(tag.sort[0])
sub_cat = TagTreeItem(parent=category, sub_cat = TagTreeItem(parent=category,
data = collapse_letter, data = collapse_letter,
category_icon = category_node.icon, category_icon = category_node.icon,