From 7ba66e692fd15a8610ab525414b059535036af62 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Sun, 25 Dec 2016 00:45:21 +0200 Subject: [PATCH] Always show progress and remaining bytes for unselected files. --- src/gui/properties/proplistdelegate.cpp | 7 +------ src/gui/torrentcontentmodelitem.cpp | 7 ++----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/gui/properties/proplistdelegate.cpp b/src/gui/properties/proplistdelegate.cpp index 38c10c6f1..6a33a6b6d 100644 --- a/src/gui/properties/proplistdelegate.cpp +++ b/src/gui/properties/proplistdelegate.cpp @@ -84,12 +84,7 @@ void PropListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti break; case REMAINING: QItemDelegate::drawBackground(painter, opt, index); - if (index.sibling(index.row(), PRIORITY).data().toInt() == prio::IGNORED) { - QItemDelegate::drawDisplay(painter, opt, option.rect, tr("N/A")); - } - else { - QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong())); - } + QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong())); break; case PROGRESS: if (index.data().toDouble() >= 0) { diff --git a/src/gui/torrentcontentmodelitem.cpp b/src/gui/torrentcontentmodelitem.cpp index 478feac89..c841a0cb8 100644 --- a/src/gui/torrentcontentmodelitem.cpp +++ b/src/gui/torrentcontentmodelitem.cpp @@ -69,7 +69,6 @@ qulonglong TorrentContentModelItem::size() const qreal TorrentContentModelItem::progress() const { Q_ASSERT(!isRootItem()); - if (m_priority == prio::IGNORED) return 0; if (m_size > 0) return m_progress; @@ -78,10 +77,8 @@ qreal TorrentContentModelItem::progress() const qulonglong TorrentContentModelItem::remaining() const { - Q_ASSERT(!isRootItem()); - if (m_priority == prio::IGNORED) return 0; - - return m_remaining; + Q_ASSERT(!isRootItem()); + return m_remaining; } int TorrentContentModelItem::priority() const