mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 05:01:25 -07:00
Fix torrent content checkbox state under certain conditions
PR #22190. Closes #22189.
This commit is contained in:
parent
6a5ea93c92
commit
f39e066672
1 changed files with 3 additions and 1 deletions
|
@ -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 bool hasIgnored = std::any_of(childItems.cbegin(), childItems.cend()
|
||||||
, [](const TorrentContentModelItem *childItem)
|
, [](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;
|
return hasIgnored ? Qt::PartiallyChecked : Qt::Checked;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue