From 8b26b7fd48a84765617be52ee77648201ac9576a Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 7 Aug 2007 23:15:46 +0000 Subject: [PATCH] - BUGFIX: Fixed progress column delayed sorting (after torrent finished checking) --- TODO | 1 + src/FinishedTorrents.cpp | 5 +++++ src/bittorrent.cpp | 7 ++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 149e0b752..46a8d2a9f 100644 --- a/TODO +++ b/TODO @@ -69,6 +69,7 @@ LANGUAGES UPDATED: beta4->beta5 changelog: - BUGFIX: Wait for torrent_paused_alert before saving fast resume data +- BUGFIX: Fixed progress column delayed sorting (after torrent finished checking) - BUGFIX: Finished torrents were still displayed as checking when paused by libtorrent on full disk (hit an assert) - I18N: Updated Italian translation - COSMETIC: Changed the way progress bars are rendered diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index abf60fe1c..2609af504 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -185,6 +185,11 @@ void FinishedTorrents::updateFinishedList(){ continue; } } + if(BTSession->getUncheckedTorrentsList().indexOf(hash) != -1){ + if(torrentStatus.state != torrent_status::checking_files && torrentStatus.state != torrent_status::queued_for_checking){ + BTSession->setTorrentFinishedChecking(hash); + } + } if(h.is_paused()) continue; if(torrentStatus.state == torrent_status::downloading || (torrentStatus.state != torrent_status::checking_files && torrentStatus.state != torrent_status::queued_for_checking && torrentStatus.progress != 1.)) { // What are you doing here? go back to download tab! diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 795bb0524..c9f7868f8 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -79,14 +79,15 @@ bittorrent::bittorrent(){ bittorrent::~bittorrent(){ // Disable directory scanning disableDirectoryScanning(); - // Do some saving - saveDHTEntry(); - saveFastResumeAndRatioData(); // Delete our objects delete deleter; delete timerAlerts; delete ETARefresher; delete downloader; + // Do some saving + saveDHTEntry(); + saveFastResumeAndRatioData(); + // Delete BT session delete s; }