mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-03-13 05:41:17 +00:00
Consistently emit signal when file "ignored" state is changed
PR #17042. Closes #17037.
This commit is contained in:
parent
dbfd6a2368
commit
acdd08e9a2
@ -311,7 +311,16 @@ bool TorrentContentModel::setData(const QModelIndex &index, const QVariant &valu
|
||||
item->setName(value.toString());
|
||||
break;
|
||||
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;
|
||||
default:
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user