diff --git a/qt/widgets/common/src/Batch/JobTreeView.cpp b/qt/widgets/common/src/Batch/JobTreeView.cpp index aee5ab297bac5b20f6e5cb04703300d77fd61afa..7f1301b6f77c1d500ea683612aacfe5467b17a3f 100644 --- a/qt/widgets/common/src/Batch/JobTreeView.cpp +++ b/qt/widgets/common/src/Batch/JobTreeView.cpp @@ -443,9 +443,15 @@ JobTreeView::fromFilteredModel(QModelIndex const &filteredModelIndex) const { QModelIndex JobTreeView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) { if (cursorAction == QAbstractItemView::MoveNext) { - return applyNavigationResult(navigation().moveCursorNext(currentIndex())); + auto result = navigation().moveCursorNext(currentIndex()); + while (!result.first && result.second.isValid() && !(result.second.flags() & Qt::ItemIsEditable)) + result = navigation().moveCursorNext(result.second); + return applyNavigationResult(result); } else if (cursorAction == QAbstractItemView::MovePrevious) { - return navigation().moveCursorPrevious(currentIndex()); + auto nextIndex = navigation().moveCursorPrevious(currentIndex()); + while (nextIndex.isValid() && !(nextIndex.flags() & Qt::ItemIsEditable)) + nextIndex = navigation().moveCursorPrevious(nextIndex); + return nextIndex; } else { return QTreeView::moveCursor(cursorAction, modifiers); }