From dfb0308e5a1c4311e94a796cebb239352b12a47c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 9 Feb 2025 18:37:03 +0530 Subject: [PATCH] Book list: Fix a regression that caused editing cells in a split book list not working in the second split. Fixes #2097677 [Calibre v7.25 List View no longer allow direct edit of fields in Split Window](https://bugs.launchpad.net/calibre/+bug/2097677) Note that tabbing in the split list also isnt working, will look at that next. --- src/calibre/gui2/library/delegates.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/library/delegates.py b/src/calibre/gui2/library/delegates.py index e9c85db96f..3b7264199f 100644 --- a/src/calibre/gui2/library/delegates.py +++ b/src/calibre/gui2/library/delegates.py @@ -225,7 +225,10 @@ class StyledItemDelegate(QStyledItemDelegate): self.ignore_kb_mods_on_edit = False def createEditor(self, parent, option, index): - if self.table_widget.currentIndex() != index: + current_indices = [self.table_widget.currentIndex()] + if hasattr(self.table_widget, 'pin_view'): + current_indices.append(self.table_widget.pin_view.currentIndex()) + if index not in current_indices: idx = self.table_widget.currentIndex() print(f'createEditor idx err: delegate={self.__class__.__name__}. ' f'cur idx=({idx.row()}, {idx.column()}), '