Fix hide zero values

This commit is contained in:
Vladimir Golovnev (Glassez) 2020-01-23 08:19:39 +03:00 committed by sledgehammer999
parent 1db12e4421
commit dc0b1ce227
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -205,8 +205,8 @@ QVariant TransferListModel::headerData(int section, Qt::Orientation orientation,
QString TransferListModel::displayValue(const BitTorrent::TorrentHandle *torrent, const int column) const QString TransferListModel::displayValue(const BitTorrent::TorrentHandle *torrent, const int column) const
{ {
const bool isHideState = (Preferences::instance()->getHideZeroComboValues() == 1) const bool isHideState = (Preferences::instance()->getHideZeroComboValues() == 0)
&& (torrent->state() == BitTorrent::TorrentState::PausedDownloading); // paused torrents only || (torrent->state() == BitTorrent::TorrentState::PausedDownloading); // paused torrents only
const bool hideValues = Preferences::instance()->getHideZeroValues() && isHideState; const bool hideValues = Preferences::instance()->getHideZeroValues() && isHideState;
const auto availabilityString = [hideValues](const qreal value) -> QString const auto availabilityString = [hideValues](const qreal value) -> QString