summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
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);
}