Fix another regression in manage authors related to which column is selected.

This commit is contained in:
Charles Haley 2020-06-17 11:54:23 +01:00
parent dcf699e9b4
commit 860280ec2d
2 changed files with 2 additions and 3 deletions

View File

@ -231,13 +231,13 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
# Position on the desired item
if id_to_select:
select_item = None
use_as = tweaks['categories_use_field_for_author_name']
use_as = tweaks['categories_use_field_for_author_name'] == 'author_sort'
for row in range(0, len(auts_to_show)):
if is_first_letter:
item_txt = unicode_type(self.table.item(row, 1).text() if use_as
else self.table.item(row, 0).text())
if primary_startswith(item_txt, id_to_select):
select_item = self.table.item(row, 1)
select_item = self.table.item(row, 1 if use_as else 0)
break
elif id_to_select == self.table.item(row, 0).data(Qt.UserRole):
if select_sort:

View File

@ -398,7 +398,6 @@ class TagBrowserMixin(object): # {{{
for t in get_authors_func(use_virtual_library=False):
if t[1] == id_:
id_ = t[0]
select_sort = True
break
editor = EditAuthorsDialog(parent, db, id_, select_sort, select_link,
get_authors_func, is_first_letter)