From f02bef6cf26fb2b8d593738104cd7ee6427a3348 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Sat, 18 Jul 2015 13:01:36 +0200 Subject: [PATCH] Some proxy model stuff. --- src/core/feedsproxymodel.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/core/feedsproxymodel.cpp b/src/core/feedsproxymodel.cpp index 36ee8ff43..2c2ce14e0 100755 --- a/src/core/feedsproxymodel.cpp +++ b/src/core/feedsproxymodel.cpp @@ -184,7 +184,6 @@ bool FeedsProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source return QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent); } - // TODO: učechrat QModelIndex idx = m_sourceModel->index(source_row, 0, source_parent); if (!idx.isValid()) { @@ -197,14 +196,7 @@ bool FeedsProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source // Recycle bin is always displayed. return true; } - - /* - if (m_selectedItem == NULL) { - return item->countOfUnreadMessages() > 0; - } - */ - - if (item->isParentOf(m_selectedItem)/* || item->isChildOf(m_selectedItem)*/ || m_selectedItem == item) { + else if (item->isParentOf(m_selectedItem)/* || item->isChildOf(m_selectedItem)*/ || m_selectedItem == item) { // Currently selected item and all its parents and children must be displayed. return true; }