Browse Source

Always show progress and remaining bytes for unselected files.

adaptive-webui-19844
sledgehammer999 8 years ago
parent
commit
7ba66e692f
No known key found for this signature in database
GPG Key ID: 6E4A2D025B7CC9A2
  1. 5
      src/gui/properties/proplistdelegate.cpp
  2. 3
      src/gui/torrentcontentmodelitem.cpp

5
src/gui/properties/proplistdelegate.cpp

@ -84,12 +84,7 @@ void PropListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
break; break;
case REMAINING: case REMAINING:
QItemDelegate::drawBackground(painter, opt, index); 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; break;
case PROGRESS: case PROGRESS:
if (index.data().toDouble() >= 0) { if (index.data().toDouble() >= 0) {

3
src/gui/torrentcontentmodelitem.cpp

@ -69,7 +69,6 @@ qulonglong TorrentContentModelItem::size() const
qreal TorrentContentModelItem::progress() const qreal TorrentContentModelItem::progress() const
{ {
Q_ASSERT(!isRootItem()); Q_ASSERT(!isRootItem());
if (m_priority == prio::IGNORED) return 0;
if (m_size > 0) return m_progress; if (m_size > 0) return m_progress;
@ -79,8 +78,6 @@ qreal TorrentContentModelItem::progress() const
qulonglong TorrentContentModelItem::remaining() const qulonglong TorrentContentModelItem::remaining() const
{ {
Q_ASSERT(!isRootItem()); Q_ASSERT(!isRootItem());
if (m_priority == prio::IGNORED) return 0;
return m_remaining; return m_remaining;
} }

Loading…
Cancel
Save