This commit is contained in:
Kovid Goyal 2024-09-05 14:01:21 +05:30
parent 85aba43903
commit cd9d25c1bb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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)