Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cura
diff options
context:
space:
mode:
authorRemco Burema <r.burema@ultimaker.com>2022-04-26 17:54:46 +0300
committerRemco Burema <r.burema@ultimaker.com>2022-04-26 17:54:46 +0300
commita2d721b6ac914cd14b15f06d62e508610f94b14c (patch)
treeb71d448c67cbd80f0cf3356a95ffb06e472cec27 /cura
parent854921c00288836a822bc4cae0e891ceaebc8b2a (diff)
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
Diffstat (limited to 'cura')
-rw-r--r--cura/PrinterOutput/Models/PrintJobOutputModel.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cura/PrinterOutput/Models/PrintJobOutputModel.py b/cura/PrinterOutput/Models/PrintJobOutputModel.py
index b6a12cb183..164dc5cb67 100644
--- a/cura/PrinterOutput/Models/PrintJobOutputModel.py
+++ b/cura/PrinterOutput/Models/PrintJobOutputModel.py
@@ -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: