From cf3f5f131d50c68e5be5dc05bd5f8c819b7b4dc2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 Jul 2022 19:57:10 +0530 Subject: [PATCH] Fix #1981453 [Copy from Author to Author Sort Crashes in Manage Authors.](https://bugs.launchpad.net/calibre/+bug/1981453) --- src/calibre/gui2/dialogs/edit_authors_dialog.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/dialogs/edit_authors_dialog.py b/src/calibre/gui2/dialogs/edit_authors_dialog.py index 565b5341ea..9fdb407899 100644 --- a/src/calibre/gui2/dialogs/edit_authors_dialog.py +++ b/src/calibre/gui2/dialogs/edit_authors_dialog.py @@ -475,6 +475,7 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog): def cell_changed(self, row, col): id_ = int(self.table.item(row, 0).data(Qt.ItemDataRole.UserRole)) + self.table.cellChanged.disconnect(self.cell_changed) if col == 0: item = self.table.item(row, 0) aut = str(item.text()).strip() @@ -497,5 +498,6 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog): item.set_sort_key() self.set_icon(item, id_) self.authors[id_][self.get_column_name(col)] = str(item.text()) + self.table.cellChanged.connect(self.cell_changed) self.table.setCurrentItem(item) self.table.scrollToItem(item)