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
This commit is contained in:
Dominik Riebeling 2009-06-15 20:37:55 +00:00
parent 9c19e39a40
commit c038ab4710

View file

@ -61,8 +61,11 @@ void ProgressLoggerGui::addItem(const QString &text, int flag)
void ProgressLoggerGui::setProgress(int value, int max) 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); setProgressMax(max);
setProgressValue(value);
} }