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. 7
      src/gui/properties/proplistdelegate.cpp
  2. 7
      src/gui/torrentcontentmodelitem.cpp

7
src/gui/properties/proplistdelegate.cpp

@ -84,12 +84,7 @@ void PropListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti @@ -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) {

7
src/gui/torrentcontentmodelitem.cpp

@ -69,7 +69,6 @@ qulonglong TorrentContentModelItem::size() const @@ -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 @@ -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

Loading…
Cancel
Save