summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-06-15 20:37:55 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-06-15 20:37:55 +0000
commitc038ab47108527b61935d0a243bbff189c11de70 (patch)
treebe90e56726027164b52137a01a4e39b6611e7bb3
parent9c19e39a40a8f424ac5c53ca1820550c54657a7b (diff)
downloadrockbox-c038ab47108527b61935d0a243bbff189c11de70.tar.gz
rockbox-c038ab47108527b61935d0a243bbff189c11de70.zip
Set the maximum first when updating the progresslogger progress bar as otherwise the new value will get dropped if outside of the valid range. Fixes the progress showing 0% after downloading the manual.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21302 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--rbutil/rbutilqt/progressloggergui.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/progressloggergui.cpp b/rbutil/rbutilqt/progressloggergui.cpp
index 0358d75096..a6405a9619 100644
--- a/rbutil/rbutilqt/progressloggergui.cpp
+++ b/rbutil/rbutilqt/progressloggergui.cpp
@@ -61,8 +61,11 @@ void ProgressLoggerGui::addItem(const QString &text, int flag)
61 61
62void ProgressLoggerGui::setProgress(int value, int max) 62void ProgressLoggerGui::setProgress(int value, int max)
63{ 63{
64 setProgressValue(value); 64 // set maximum first to avoid setting a value outside of the max range.
65 // If the current value is outside of the valid range QProgressBar
66 // calls reset() internally.
65 setProgressMax(max); 67 setProgressMax(max);
68 setProgressValue(value);
66} 69}
67 70
68 71