From 0363c1257cf947aff14b2543a76edc7d4cd08b20 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 4 Dec 2018 10:18:09 +0100 Subject: [PATCH] Improve exposed progress prop Contributes to CL-1153 --- cura/PrinterOutput/PrintJobOutputModel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cura/PrinterOutput/PrintJobOutputModel.py b/cura/PrinterOutput/PrintJobOutputModel.py index 604fd8e0b8..256c9dffe9 100644 --- a/cura/PrinterOutput/PrintJobOutputModel.py +++ b/cura/PrinterOutput/PrintJobOutputModel.py @@ -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: