mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
- Fix issue with torrent label not being remembered on startup under certain circumstances
This commit is contained in:
parent
a7820e5f08
commit
a1dd724220
@ -285,6 +285,8 @@ protected slots:
|
|||||||
applyLabelFilter(0);
|
applyLabelFilter(0);
|
||||||
// Un display filter
|
// Un display filter
|
||||||
delete labelFilters->takeItem(row);
|
delete labelFilters->takeItem(row);
|
||||||
|
// Save custom labels to remember it was deleted
|
||||||
|
saveCustomLabels();
|
||||||
}
|
}
|
||||||
|
|
||||||
void applyLabelFilter(int row) {
|
void applyLabelFilter(int row) {
|
||||||
|
@ -900,7 +900,9 @@ void TransferListWidget::setSelectionLabel(QString label) {
|
|||||||
void TransferListWidget::removeLabelFromRows(QString label) {
|
void TransferListWidget::removeLabelFromRows(QString label) {
|
||||||
for(int i=0; i<listModel->rowCount(); ++i) {
|
for(int i=0; i<listModel->rowCount(); ++i) {
|
||||||
if(listModel->data(listModel->index(i, TR_LABEL)) == label) {
|
if(listModel->data(listModel->index(i, TR_LABEL)) == label) {
|
||||||
|
QString hash = getHashFromRow(i);
|
||||||
listModel->setData(listModel->index(i, TR_LABEL), "", Qt::DisplayRole);
|
listModel->setData(listModel->index(i, TR_LABEL), "", Qt::DisplayRole);
|
||||||
|
TorrentPersistentData::saveLabel(hash, "");
|
||||||
emit torrentChangedLabel(label, "");
|
emit torrentChangedLabel(label, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user