fix progress.update(value=0) to not increment progress (#1998)

This commit is contained in:
BlueGreenMagick 2022-08-01 19:16:42 +09:00 committed by GitHub
parent 3e28605638
commit a7208601fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,7 +219,7 @@ class ProgressManager:
self._max = max or 0
self._win.form.progressBar.setMaximum(self._max)
if self._max:
self._counter = value or (self._counter + 1)
self._counter = value if value is not None else (self._counter + 1)
self._win.form.progressBar.setValue(self._counter)
def finish(self) -> None: