Improve exposed progress prop

Contributes to CL-1153
This commit is contained in:
Ian Paschal 2018-12-04 10:18:09 +01:00
parent 95400282b9
commit 0363c1257c

View file

@ -133,9 +133,8 @@ class PrintJobOutputModel(QObject):
@pyqtProperty(float, notify = timeElapsedChanged)
def progress(self) -> float:
result = self.timeElapsed / self.timeTotal
if result > 1.0:
result = 1.0
return result
# Never get a progress past 1.0
return min(result, 1.0)
@pyqtProperty(str, notify=stateChanged)
def state(self) -> str: