From a1dd7242201e31d87c877cfbce16889042f867dd Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 3 Jan 2010 13:15:26 +0000 Subject: [PATCH] - Fix issue with torrent label not being remembered on startup under certain circumstances --- src/transferlistfilterswidget.h | 2 ++ src/transferlistwidget.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/transferlistfilterswidget.h b/src/transferlistfilterswidget.h index 32a7127a5..f6a2fe524 100644 --- a/src/transferlistfilterswidget.h +++ b/src/transferlistfilterswidget.h @@ -285,6 +285,8 @@ protected slots: applyLabelFilter(0); // Un display filter delete labelFilters->takeItem(row); + // Save custom labels to remember it was deleted + saveCustomLabels(); } void applyLabelFilter(int row) { diff --git a/src/transferlistwidget.cpp b/src/transferlistwidget.cpp index 189b89750..464e28a08 100644 --- a/src/transferlistwidget.cpp +++ b/src/transferlistwidget.cpp @@ -900,7 +900,9 @@ void TransferListWidget::setSelectionLabel(QString label) { void TransferListWidget::removeLabelFromRows(QString label) { for(int i=0; irowCount(); ++i) { if(listModel->data(listModel->index(i, TR_LABEL)) == label) { + QString hash = getHashFromRow(i); listModel->setData(listModel->index(i, TR_LABEL), "", Qt::DisplayRole); + TorrentPersistentData::saveLabel(hash, ""); emit torrentChangedLabel(label, ""); } }