mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Improve exposed progress prop
Contributes to CL-1153
This commit is contained in:
parent
95400282b9
commit
0363c1257c
1 changed files with 2 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue