mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-19 12:22:47 +01:00
fix #459
This commit is contained in:
parent
07d48240d5
commit
56948c1238
@ -30,7 +30,7 @@
|
||||
<url type="donation">https://martinrotter.github.io/donate/</url>
|
||||
<content_rating type="oars-1.1" />
|
||||
<releases>
|
||||
<release version="3.9.2" date="2021-08-06"/>
|
||||
<release version="3.9.2" date="2021-08-09"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.0">
|
||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||
|
@ -363,32 +363,32 @@ void FeedsView::openSelectedItemsInNewspaperMode() {
|
||||
}
|
||||
|
||||
void FeedsView::selectNextItem() {
|
||||
QModelIndex index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier);
|
||||
QModelIndex index_next = moveCursor(QAbstractItemView::CursorAction::MoveDown, Qt::KeyboardModifier::NoModifier);
|
||||
|
||||
while (m_proxyModel->hasChildren(index_next) && !isExpanded(index_next)) {
|
||||
expand(index_next);
|
||||
index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier);
|
||||
index_next = moveCursor(QAbstractItemView::CursorAction::MoveDown, Qt::KeyboardModifier::NoModifier);
|
||||
}
|
||||
|
||||
if (index_next.isValid()) {
|
||||
setCurrentIndex(index_next);
|
||||
scrollTo(index_next, QAbstractItemView::ScrollHint::PositionAtTop);
|
||||
scrollTo(index_next, QAbstractItemView::ScrollHint::EnsureVisible);
|
||||
}
|
||||
|
||||
setFocus();
|
||||
}
|
||||
|
||||
void FeedsView::selectPreviousItem() {
|
||||
QModelIndex index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier);
|
||||
QModelIndex index_previous = moveCursor(QAbstractItemView::CursorAction::MoveUp, Qt::KeyboardModifier::NoModifier);
|
||||
|
||||
while (m_proxyModel->hasChildren(index_previous) && !isExpanded(index_previous)) {
|
||||
expand(index_previous);
|
||||
index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier);
|
||||
index_previous = moveCursor(QAbstractItemView::CursorAction::MoveUp, Qt::KeyboardModifier::NoModifier);
|
||||
}
|
||||
|
||||
if (index_previous.isValid()) {
|
||||
setCurrentIndex(index_previous);
|
||||
scrollTo(index_previous, QAbstractItemView::ScrollHint::PositionAtTop);
|
||||
scrollTo(index_previous, QAbstractItemView::ScrollHint::EnsureVisible);
|
||||
}
|
||||
|
||||
setFocus();
|
||||
@ -406,7 +406,7 @@ void FeedsView::selectNextUnreadItem() {
|
||||
|
||||
if (next_unread_row.isValid()) {
|
||||
setCurrentIndex(next_unread_row);
|
||||
scrollTo(next_unread_row, QAbstractItemView::ScrollHint::PositionAtTop);
|
||||
scrollTo(next_unread_row, QAbstractItemView::ScrollHint::EnsureVisible);
|
||||
emit requestViewNextUnreadMessage();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user