mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Consistently emit signal when file "ignored" state is changed
PR #17042. Closes #17037.
This commit is contained in:
parent
aa39c7aae5
commit
8d408ffc8b
1 changed files with 10 additions and 1 deletions
|
@ -313,7 +313,16 @@ bool TorrentContentModel::setData(const QModelIndex &index, const QVariant &valu
|
||||||
item->setName(value.toString());
|
item->setName(value.toString());
|
||||||
break;
|
break;
|
||||||
case TorrentContentModelItem::COL_PRIO:
|
case TorrentContentModelItem::COL_PRIO:
|
||||||
item->setPriority(static_cast<BitTorrent::DownloadPriority>(value.toInt()));
|
{
|
||||||
|
const BitTorrent::DownloadPriority previousPrio = item->priority();
|
||||||
|
const auto newPrio = static_cast<BitTorrent::DownloadPriority>(value.toInt());
|
||||||
|
item->setPriority(newPrio);
|
||||||
|
if ((newPrio != previousPrio) && ((newPrio == BitTorrent::DownloadPriority::Ignored)
|
||||||
|
|| (previousPrio == BitTorrent::DownloadPriority::Ignored)))
|
||||||
|
{
|
||||||
|
emit filteredFilesChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue