From 2d3914c0778095e8b9bbaa1093a98f013acbcb53 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Thu, 4 May 2017 12:39:59 +0300 Subject: [PATCH] Prevent incorrect popullating of Unread RSS list --- src/gui/rss/feedlistwidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/rss/feedlistwidget.cpp b/src/gui/rss/feedlistwidget.cpp index b4a2b5650..7065f1bad 100644 --- a/src/gui/rss/feedlistwidget.cpp +++ b/src/gui/rss/feedlistwidget.cpp @@ -138,6 +138,11 @@ void FeedListWidget::handleItemPathChanged(RSS::Item *rssItem) void FeedListWidget::handleItemAboutToBeRemoved(RSS::Item *rssItem) { delete m_rssToTreeItemMapping.take(rssItem); + + // RSS Item is still valid in this slot so if it is the last + // item we should prevent Unread list populating + if (m_rssToTreeItemMapping.size() == 1) + setCurrentItem(nullptr); } QTreeWidgetItem *FeedListWidget::stickyUnreadItem() const