From a4e468b17149a52ddf51d504fd966c9def6e09f6 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 8 Jul 2015 09:38:13 -0700 Subject: [PATCH] Download view cleanups. --- alethzero/DownloadView.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/alethzero/DownloadView.cpp b/alethzero/DownloadView.cpp index 046b8973a..c87f14685 100644 --- a/alethzero/DownloadView.cpp +++ b/alethzero/DownloadView.cpp @@ -66,12 +66,8 @@ void SyncView::paintEvent(QPaintEvent*) unsigned hashCount = sync.state == SyncState::Hashes ? sync.hashesTotal : downloadCount; unsigned hashDone = hashFrom + (sync.state == SyncState::Hashes ? sync.hashesReceived : hashCount); - m_lastFrom = min(syncFrom, m_lastFrom); - m_lastTo = max(max(syncFrom + syncCount, hashFrom + hashCount), m_lastTo); - unsigned from = min(min(hashFrom, downloadFrom), min(syncFrom, m_lastFrom)); - unsigned count = max(max(hashFrom + hashCount, downloadFrom + downloadCount), max(syncFrom + syncCount, m_lastTo)) - from; - m_lastFrom = (m_lastFrom * 99 + syncFrom * 1) / 100; - m_lastTo = (m_lastTo * 99 + max(syncFrom + syncCount, hashFrom + hashCount) * 1) / 100; + unsigned from = min(min(hashFrom, downloadFrom), syncFrom); + unsigned count = max(max(hashFrom + hashCount, downloadFrom + downloadCount), syncFrom + syncCount) - from; if (!count) {