Skip to content

Commit

Permalink
Fix torrent content checkbox state under certain conditions
Browse files Browse the repository at this point in the history
PR #22190.
Closes #22189.
  • Loading branch information
thalieht authored Jan 24, 2025
1 parent f8c4834 commit 05787d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/torrentcontentmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 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;
Expand Down

0 comments on commit 05787d9

Please sign in to comment.