Browse Source

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

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
a1dd724220
  1. 2
      src/transferlistfilterswidget.h
  2. 2
      src/transferlistwidget.cpp

2
src/transferlistfilterswidget.h

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

2
src/transferlistwidget.cpp

@ -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…
Cancel
Save