mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
75b21a2d79
@ -467,6 +467,8 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
|||||||
else:
|
else:
|
||||||
ca = m.addAction(_('Copy to author'))
|
ca = m.addAction(_('Copy to author'))
|
||||||
ca.triggered.connect(self.copy_aus_to_au)
|
ca.triggered.connect(self.copy_aus_to_au)
|
||||||
|
ca = m.addAction(_('Recalculate sort from author'))
|
||||||
|
ca.triggered.connect(self.do_recalc_one_author_sort)
|
||||||
m.addSeparator()
|
m.addSeparator()
|
||||||
m.addMenu(case_menu)
|
m.addMenu(case_menu)
|
||||||
m.exec(self.table.viewport().mapToGlobal(point))
|
m.exec(self.table.viewport().mapToGlobal(point))
|
||||||
@ -610,6 +612,12 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
|||||||
self.set_icon(item_aus, id_)
|
self.set_icon(item_aus, id_)
|
||||||
self.table.setFocus(Qt.FocusReason.OtherFocusReason)
|
self.table.setFocus(Qt.FocusReason.OtherFocusReason)
|
||||||
|
|
||||||
|
def do_recalc_one_author_sort(self):
|
||||||
|
row = self.context_item.row()
|
||||||
|
aut = str(self.table.item(row, AUTHOR_COLUMN).text()).strip()
|
||||||
|
dest = self.table.item(row, AUTHOR_SORT_COLUMN)
|
||||||
|
dest.setText(str(author_to_author_sort(aut)).rstrip(','))
|
||||||
|
|
||||||
def do_auth_sort_to_author(self):
|
def do_auth_sort_to_author(self):
|
||||||
with self.no_cell_changed():
|
with self.no_cell_changed():
|
||||||
for row in range(0,self.table.rowCount()):
|
for row in range(0,self.table.rowCount()):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user