mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 21:38:51 +03:00
Now user-created labels "all" and "none" works as regular labels
This commit is contained in:
parent
f235c0ae6c
commit
976982ba09
3 changed files with 7 additions and 10 deletions
|
@ -359,10 +359,10 @@ void TransferListFiltersWidget::removeSelectedLabel() {
|
|||
void TransferListFiltersWidget::applyLabelFilter(int row) {
|
||||
switch(row) {
|
||||
case 0:
|
||||
transferList->applyLabelFilter("all");
|
||||
transferList->applyLabelFilterAll();
|
||||
break;
|
||||
case 1:
|
||||
transferList->applyLabelFilter("none");
|
||||
transferList->applyLabelFilter(QString());
|
||||
break;
|
||||
default:
|
||||
transferList->applyLabelFilter(labelFilters->labelFromRow(row));
|
||||
|
|
|
@ -885,15 +885,11 @@ void TransferListWidget::currentChanged(const QModelIndex& current, const QModel
|
|||
emit currentTorrentChanged(h);
|
||||
}
|
||||
|
||||
void TransferListWidget::applyLabelFilterAll() {
|
||||
nameFilterModel->disableLabelFilter();
|
||||
}
|
||||
|
||||
void TransferListWidget::applyLabelFilter(QString label) {
|
||||
if (label == "all") {
|
||||
nameFilterModel->disableLabelFilter();
|
||||
return;
|
||||
}
|
||||
if (label == "none") {
|
||||
nameFilterModel->setLabelFilter(QString());
|
||||
return;
|
||||
}
|
||||
qDebug("Applying Label filter: %s", qPrintable(label));
|
||||
nameFilterModel->setLabelFilter(label);
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ public slots:
|
|||
void displayDLHoSMenu(const QPoint&);
|
||||
void applyNameFilter(const QString& name);
|
||||
void applyStatusFilter(int f);
|
||||
void applyLabelFilterAll();
|
||||
void applyLabelFilter(QString label);
|
||||
void previewFile(QString filePath);
|
||||
void removeLabelFromRows(QString label);
|
||||
|
|
Loading…
Reference in a new issue