diff options
-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 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 | ||
62 | void ProgressLoggerGui::setProgress(int value, int max) | 62 | void 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 | ||