mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:48:59 +08:00
Improve exposed progress prop
Contributes to CL-1153
This commit is contained in:
parent
95400282b9
commit
0363c1257c
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user