From 86414a17e6506538caeb6a19d2becce5f8911db9 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sat, 16 Jul 2022 14:49:50 +0100 Subject: [PATCH] Fix leaving bits of the background selection sometimes visible when editing sort and link columns. This change makes the editor widget fill the underlying cell. As an aside, shouldn't EnLineEdit do setClearButtonEnabled(True) to be like other widgets? --- src/calibre/gui2/dialogs/edit_authors_dialog.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/calibre/gui2/dialogs/edit_authors_dialog.py b/src/calibre/gui2/dialogs/edit_authors_dialog.py index 225869c5fe..87cf0d60c8 100644 --- a/src/calibre/gui2/dialogs/edit_authors_dialog.py +++ b/src/calibre/gui2/dialogs/edit_authors_dialog.py @@ -55,11 +55,9 @@ class EditColumnDelegate(QItemDelegate): editor = EditWithComplete(parent) editor.set_separator(None) editor.update_items_cache(self.completion_data) - else: - from calibre.gui2.widgets import EnLineEdit - editor = EnLineEdit(parent) - return editor - return QItemDelegate.createEditor(self, parent, option, index) + return editor + from calibre.gui2.widgets import EnLineEdit + return EnLineEdit(parent) class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):