From 232773c582bfc7797dbd0c50bf4377622aac3ad0 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 18 Feb 2021 13:48:44 +0000 Subject: [PATCH] Rolled up sample download progress only reflects selected items --- SampleDownloader/Directory.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/SampleDownloader/Directory.cpp b/SampleDownloader/Directory.cpp index c70e3d399..45ebe6b5f 100644 --- a/SampleDownloader/Directory.cpp +++ b/SampleDownloader/Directory.cpp @@ -296,14 +296,15 @@ void Directory::update (QTreeWidgetItem * item) int counted {0}; // get the count, progress and size of children - int items {recurse_children (item, &counted, &bytes, &max)}; + // int items {recurse_children (item, &counted, &bytes, &max)}; + recurse_children (item, &counted, &bytes, &max); // estimate size of items not yet downloaded as average of // those actually present - if (counted) - { - max += (items - counted) * max / counted; - } + // if (counted) + // { + // max += (items - counted) * max / counted; + // } // save as our progress item->setData (1, Qt::UserRole, max);