mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Always return int's.
The problem was probably 'max', but cast the others just to be sure. (This would cause the C++ part of Qt to think it wasbeing given a float from Pyton somehow.) should fix CURA-9196
This commit is contained in:
parent
854921c002
commit
a2d721b6ac
1 changed files with 3 additions and 3 deletions
|
@ -119,16 +119,16 @@ class PrintJobOutputModel(QObject):
|
|||
|
||||
@pyqtProperty(int, notify = timeTotalChanged)
|
||||
def timeTotal(self) -> int:
|
||||
return self._time_total
|
||||
return int(self._time_total)
|
||||
|
||||
@pyqtProperty(int, notify = timeElapsedChanged)
|
||||
def timeElapsed(self) -> int:
|
||||
return self._time_elapsed
|
||||
return int(self._time_elapsed)
|
||||
|
||||
@pyqtProperty(int, notify = timeElapsedChanged)
|
||||
def timeRemaining(self) -> int:
|
||||
# Never get a negative time remaining
|
||||
return max(self.timeTotal - self.timeElapsed, 0)
|
||||
return int(max(self.timeTotal - self.timeElapsed, 0))
|
||||
|
||||
@pyqtProperty(float, notify = timeElapsedChanged)
|
||||
def progress(self) -> float:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue