From cd9d25c1bbc1515930b1496d04367c2c6c8bc9cc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Sep 2024 14:01:21 +0530 Subject: [PATCH] ... --- src/calibre/gui2/library/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py index b120c53152..1a9aea3442 100644 --- a/src/calibre/gui2/library/views.py +++ b/src/calibre/gui2/library/views.py @@ -1651,8 +1651,8 @@ class BooksView(QTableView): # {{{ if move_by is not None: hint = QAbstractItemDelegate.EndEditHint.NoHint ans = super().closeEditor(editor, hint) - if move_by is not None and self.currentIndex() == orig: - index = self.moveCursor(move_by,Qt.KeyboardModifier.NoModifier) + if move_by is not None and self.currentIndex() == orig and self.state() is not QAbstractItemView.State.EditingState: + index = self.moveCursor(move_by, Qt.KeyboardModifier.NoModifier) if index.isValid(): def edit(): self.setCurrentIndex(index)