mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03:00
- Fix issue with torrent label not being remembered on startup under certain circumstances
This commit is contained in:
parent
a7820e5f08
commit
a1dd724220
2 changed files with 4 additions and 0 deletions
|
@ -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 a new issue