Skip to content

Commit

Permalink
Fix torrent content checkbox state under certain conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
thalieht authored and glassez committed Jan 26, 2025
1 parent 6a5ea93 commit f39e066
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 @@ -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;
Expand Down

0 comments on commit f39e066

Please sign in to comment.