From 3d9f3eb1b33bc7415e2e8dc10e8d78beb98d55dc Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Mon, 18 Nov 2013 01:32:08 +0200 Subject: [PATCH] Correctly update tracker tier number in the trackers tab. Closes #1075. --- src/properties/trackerlist.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/properties/trackerlist.cpp b/src/properties/trackerlist.cpp index 6134cbbab..df5427e85 100644 --- a/src/properties/trackerlist.cpp +++ b/src/properties/trackerlist.cpp @@ -141,6 +141,7 @@ void TrackerList::moveSelectionUp() { h.replace_trackers(trackers); // Reannounce h.force_reannounce(); + loadTrackers(); } void TrackerList::moveSelectionDown() { @@ -177,6 +178,7 @@ void TrackerList::moveSelectionDown() { h.replace_trackers(trackers); // Reannounce h.force_reannounce(); + loadTrackers(); } void TrackerList::clear() { @@ -252,13 +254,13 @@ void TrackerList::loadTrackers() { QTreeWidgetItem *item = tracker_items.value(tracker_url, 0); if (!item) { item = new QTreeWidgetItem(); - item->setText(COL_TIER, QString::number(it->tier)); item->setText(COL_URL, tracker_url); addTopLevelItem(item); tracker_items[tracker_url] = item; } else { old_trackers_urls.removeOne(tracker_url); } + item->setText(COL_TIER, QString::number(it->tier)); TrackerInfos data = trackers_data.value(tracker_url, TrackerInfos(tracker_url)); QString error_message = data.last_message.trimmed(); if (it->verified) { @@ -292,10 +294,11 @@ void TrackerList::askForTrackers() { if (!h.is_valid()) return; QStringList trackers = TrackersAdditionDlg::askForTrackers(h); if (!trackers.empty()) { - foreach (const QString& tracker, trackers) { + for (int i=0; i