diff --git a/src/librssguard/gui/messagesview.cpp b/src/librssguard/gui/messagesview.cpp index 834709a98..016c786e6 100644 --- a/src/librssguard/gui/messagesview.cpp +++ b/src/librssguard/gui/messagesview.cpp @@ -221,7 +221,14 @@ void MessagesView::setupAppearance() { void MessagesView::focusInEvent(QFocusEvent* event) { QTreeView::focusInEvent(event); - if (currentIndex().isValid()) { + qDebugNN << LOGSEC_GUI + << "Message list got focus with reason" + << QUOTE_W_SPACE_DOT(event->reason()); + + if ((event->reason()== Qt::FocusReason::TabFocusReason || + event->reason()== Qt::FocusReason::BacktabFocusReason || + event->reason()== Qt::FocusReason::ShortcutFocusReason) && + currentIndex().isValid()) { selectionModel()->select(currentIndex(), QItemSelectionModel::SelectionFlag::Select | QItemSelectionModel::SelectionFlag::Rows); } } diff --git a/src/librssguard/gui/webbrowser.cpp b/src/librssguard/gui/webbrowser.cpp index 61a61e84b..f4750d593 100644 --- a/src/librssguard/gui/webbrowser.cpp +++ b/src/librssguard/gui/webbrowser.cpp @@ -161,7 +161,7 @@ void WebBrowser::loadMessages(const QList& messages, RootItem* root) { } void WebBrowser::loadMessage(const Message& message, RootItem* root) { - loadMessages(QList() << message, root); + loadMessages({ message }, root); } bool WebBrowser::eventFilter(QObject* watched, QEvent* event) {