mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-23 03:52:45 -05:00
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:
parent
9c19e39a40
commit
c038ab4710
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue