- Fix issue with torrent label not being remembered on startup under certain circumstances

This commit is contained in:
Christophe Dumez 2010-01-03 13:15:26 +00:00
parent a7820e5f08
commit a1dd724220
2 changed files with 4 additions and 0 deletions

View file

@ -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) {

View file

@ -900,7 +900,9 @@ void TransferListWidget::setSelectionLabel(QString label) {
void TransferListWidget::removeLabelFromRows(QString label) {
for(int i=0; i<listModel->rowCount(); ++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, "");
}
}