remove useless torrent state check

This commit is contained in:
Mark 2025-07-07 07:16:37 +04:00
commit f11abd493b

View file

@ -90,11 +90,7 @@ void TransferListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
QStyleOptionViewItem customOption {option};
customOption.state.setFlag(QStyle::State_Enabled, isEnableState(torrentState));
QColor color = {};
if (torrentState != TorrentState::Unknown)
{
color = index.data(Qt::ForegroundRole).value<QColor>();
}
const QColor color = index.data(Qt::ForegroundRole).value<QColor>();
m_progressBarPainter.paint(painter, customOption, index.data().toString(), progress, color);
}