mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -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)
|
@pyqtProperty(float, notify = timeElapsedChanged)
|
||||||
def progress(self) -> float:
|
def progress(self) -> float:
|
||||||
result = self.timeElapsed / self.timeTotal
|
result = self.timeElapsed / self.timeTotal
|
||||||
if result > 1.0:
|
# Never get a progress past 1.0
|
||||||
result = 1.0
|
return min(result, 1.0)
|
||||||
return result
|
|
||||||
|
|
||||||
@pyqtProperty(str, notify=stateChanged)
|
@pyqtProperty(str, notify=stateChanged)
|
||||||
def state(self) -> str:
|
def state(self) -> str:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue