diff options
| author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-06-15 20:37:55 +0000 |
|---|---|---|
| committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-06-15 20:37:55 +0000 |
| commit | c038ab47108527b61935d0a243bbff189c11de70 (patch) | |
| tree | be90e56726027164b52137a01a4e39b6611e7bb3 | |
| parent | 9c19e39a40a8f424ac5c53ca1820550c54657a7b (diff) | |
| download | rockbox-c038ab47108527b61935d0a243bbff189c11de70.zip rockbox-c038ab47108527b61935d0a243bbff189c11de70.tar.gz rockbox-c038ab47108527b61935d0a243bbff189c11de70.tar.bz2 rockbox-c038ab47108527b61935d0a243bbff189c11de70.tar.xz | |
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.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/progressloggergui.cpp b/rbutil/rbutilqt/progressloggergui.cpp index 0358d75..a6405a9 100644 --- a/rbutil/rbutilqt/progressloggergui.cpp +++ b/rbutil/rbutilqt/progressloggergui.cpp @@ -61,8 +61,11 @@ void ProgressLoggerGui::addItem(const QString &text, int flag) void ProgressLoggerGui::setProgress(int value, int max) { - setProgressValue(value); + // set maximum first to avoid setting a value outside of the max range. + // If the current value is outside of the valid range QProgressBar + // calls reset() internally. setProgressMax(max); + setProgressValue(value); } |