mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
Fix torrent content checkbox state under certain conditions
PR #22190. Closes #22189.
This commit is contained in:
committed by
Vladimir Golovnev (Glassez)
parent
6a5ea93c92
commit
f39e066672
@@ -398,7 +398,9 @@ QVariant TorrentContentModel::data(const QModelIndex &index, const int role) con
|
||||
const bool hasIgnored = std::any_of(childItems.cbegin(), childItems.cend()
|
||||
, [](const TorrentContentModelItem *childItem)
|
||||
{
|
||||
return (childItem->priority() == BitTorrent::DownloadPriority::Ignored);
|
||||
const auto prio = childItem->priority();
|
||||
return ((prio == BitTorrent::DownloadPriority::Ignored)
|
||||
|| (prio == BitTorrent::DownloadPriority::Mixed));
|
||||
});
|
||||
|
||||
return hasIgnored ? Qt::PartiallyChecked : Qt::Checked;
|
||||
|
||||
Reference in New Issue
Block a user