mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
Fix torrent content checkbox state under certain conditions
PR #22190. Closes #22189.
This commit is contained in:
@@ -400,7 +400,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;
|
||||||
|
|||||||
Reference in New Issue
Block a user